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[(_at_)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[(_at_)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