I've been trying to use XSL with Google Chrome, but with no success.
I read that Chrome have some bugs with XSLT, and one of them is that it doesn't support xsl:include. Bug can be checked here: http://code.google.com/p/chromium/issues/detail?id=8441.
After some research I found a new version of the transform plugin by Daer System, and it makes xsl:include work at Chrome.
jQuery Transform plugin can be found from http://plugins.jquery.com/project/Transform
Now my problem is:
I use a default include in some xsl templates, and this include uses a parameter that is passed to the top level one.
So its like i have the top.xsl template that declares a [xsl:param name="param" /], and i use this param with the included.xsl, that is called by the 1st one with [xsl:include href="included.xsl"] . This works both on Firefox and Internet Explorer, but not on Chrome. I saw a question here on stackoverflow where some guy re-write the webkit fix function from the plugin, but it doesn't work with xsl:param this way.
Does anyone know some way to use [xsl:param] like this in Google Chrome?
Your problem here is that Google Chrome (=Chromium) does not support xsl:include
The lack of this feature is well noted in the Chromium project as raised in "Issue 8441: XSLTProcessor in JS does not permit xsl:include for http". It seems that the problem is caused by some architectural problem in WebKit (the rendering engine used in Chrome). Since this problem originates to WebKit, the bug is marked as WontFix -- the fix will be provided (hopefully) in the future as the original problem in the WebKit is getting resolved.
I see three possible alternatives of how this problem could be resolved for you:
xsl:include
for Chrome/Webkit (potentially requires a lot of work / developing a hack)
My recommendation: avoid using xsl:include with xsl:param on client side unless you are willing to give up on cross-browser compatibility
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With