|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Variables in attribute expressions - version of standa
I find that this stylesheet fragment to allow the $foo parameter to be
used to select the 'fred' element with id equal to it:
<xsl:param name="foo" select="'bar'" /> <xsl:template match="/"> <html> <body> <xsl:apply-templates /> </body> </html> </xsl:template> <xsl:template match="//fred[@id = $foo]"> <b> <xsl:value-of select="baz/name" /> </b> </xsl:template> works with Xalan 1.4.0, but trying it in IE 6.0, with the msxml4.0 toolkit, like this: srcTree = new ActiveXObject("Msxml2.DOMDocument.4.0");
srcTree.async=false;
srcTree.load("test1.xml"); var xsltTree= new ActiveXObject("Msxml2.DOMDocument.4.0");
xsltTree.async = false;
xsltTree.load("rmanage.xsl");
details.innerHTML = srcTree.transformNode(xsltTree);gives an error about the use of $foo in match="//class[@id = $foo]"> I also got the same error from Xselerator (from MarrowSoft), version 2.5.7. I guess an academic question would be "who is correct?", but since our customers will use IE no matter how broken it is, the real question is: is there a way to write this such that it will work everywhere (more or less)? XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








