[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Q: How can Firefox access google maps api in XSLT?


Subject: Re: [xsl] Q: How can Firefox access google maps api in XSLT?
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Fri, 26 Oct 2012 11:14:14 +0200

Hermann Stamm-Wilbrandt wrote:

OK, now I really simplified the sample to a minimum.
The XML does not work for Firefox with the same error message, while the
XHTML is fine:
http://www.stamm-wilbrandt.de/en/xsl-list/gmap/s.xml
http://www.stamm-wilbrandt.de/en/xsl-list/gmap/s.html

Given the simplicity and that s.xsl just copies the XHTML file s.html I
have no idea on
what to do to make Firefox work with Google Maps API (v3) in a stylesheet:

As far as I can tell the problem with Firefox is likely caused by an attempt to use the DOM's document.write method to inject a script element dynamically. That is done by the Google maps code you include it seems.
As Firefox's XSLT implementation directly renders the result tree of the XSLT transformation is does not support document.write in the result document (see https://developer.mozilla.org/en-US/docs/XSL_Transformations_in_Mozilla_FAQ#What_about_document.write.3F).


I don't see an easy workaround, unless Google provides an API or a way to use the maps code without relying on document.write.

--

	Martin Honnen --- MVP Data Platform Development
	http://msmvps.com/blogs/martin_honnen/


Current Thread
Keywords