=== modified file 'sites/all/modules/xmlsitemap/xmlsitemap.xmlsitemap.inc'
--- xmlsitemap.xmlsitemap.inc	2011-03-31 03:13:55 +0000
+++ xmlsitemap.xmlsitemap.inc	2011-05-15 21:46:27 +0000
@@ -54,7 +54,14 @@ class XMLSitemapWriter extends XMLWriter
    * Add the XML stylesheet to the XML page.
    */
   public function writeXSL() {
-    $this->writePi('xml-stylesheet', 'type="text/xsl" href="' . url('sitemap.xsl') . '"');
+    $options = array();
+    if (variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE) == LANGUAGE_NEGOTIATION_DOMAIN) {
+      // language_url_rewrite() will output an absolute URL - unless we
+      // explicitly pass a 'hacked' language object.
+      $options['language'] = $this->sitemap->uri['options']['language'];
+      unset($options['language']->domain);
+    }
+    $this->writePi('xml-stylesheet', 'type="text/xsl" href="' . url('sitemap.xsl', $options) . '"');
     $this->writeRaw(PHP_EOL);
   }
 

