Index: xmlsitemap.admin.inc
===================================================================
--- xmlsitemap.admin.inc	(revision 1909)
+++ xmlsitemap.admin.inc	(working copy)
@@ -53,6 +53,12 @@
     '#default_value' => variable_get('xmlsitemap_use_stylesheet', FALSE),
     '#description' => t('Specify a xml stylesheet for the sitemap?'),
   );
+  $form['general']['xmlsitemap_mobile'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Display as mobile sitemap'),
+    '#default_value' => variable_get('xmlsitemap_mobile', 0),
+    '#description' => t('Dispaly sitemap in mobile format'),
+  );
   $form['frontpage'] = array(
     '#type' => 'fieldset',
     '#title' => t('Front page'),
Index: xmlsitemap.pages.inc
===================================================================
--- xmlsitemap.pages.inc	(revision 1909)
+++ xmlsitemap.pages.inc	(working copy)
@@ -166,14 +166,19 @@
  *  0).
  */
 function _xmlsitemap_create_cache_chunk($fp, $chunk_size, $chunk = 0) {
+  $is_mobile = variable_get('xmlsitemap_mobile', 0);
   fwrite($fp, '<?xml version="1.0" encoding="UTF-8"?>' . "\n");
   if ($xsl = _xmlsitemap_xsl()) {
     fwrite($fp, '<?xml-stylesheet type="text/xsl" href="' . $xsl . '" ?>' . "\n");
   }
   fwrite($fp, '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"' . "\n");
-  fwrite($fp, '  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' . "\n");
-  fwrite($fp, '  xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9' . "\n");
-  fwrite($fp, '  http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">' . "\n");
+  if ($is_mobile) {
+    fwrite($fp, '  xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0">' . "\n");
+  }else{
+    fwrite($fp, '  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' . "\n");
+    fwrite($fp, '  xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9' . "\n");
+    fwrite($fp, '  http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">' . "\n");
+  }
   $start = $chunk * $chunk_size;
   $links = db_query_range("SELECT xsm.loc, xsm.module, xsm.type, xsm.id, xsm.sid, xsm.changed, xsm.changefreq, xsm.priority". xmlsitemap_sitemap_query() ."ORDER BY xsm.priority DESC, xsm.changed DESC, xsm.changefreq, xsm.loc", $start, $chunk_size);
   while ($link = db_fetch_object($links)) {
@@ -198,6 +203,9 @@
       $link->output .= "\t<lastmod>". gmdate(DATE_W3C, $link->changed) ."</lastmod>\n";
       $link->output .= "\t<changefreq>". xmlsitemap_sitemap_frequency($link->changefreq) ."</changefreq>\n";
       $link->output .= "\t<priority>". number_format($link->priority, 1) ."</priority>\n";
+      if ($is_mobile) {
+      	$link->output .= "\t<mobile:mobile/>\n";
+      }
       $link->output .= "</url>\n";
       fwrite($fp, $link->output);
     }
