You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Mingfei Peng <mf...@excite.com> on 2000/11/24 04:23:24 UTC

Problem of handling top-level variables in Xalan-C

Both Xalan-j 1.2.1 and Saxon 6.0 can handle the following XSL file, but
Xalan-C 1.0 report a parse error:
XSL Error: Could not get variable named part

But it is obvious that $part has been defined, so I think there is an bug in
Xalan-C. When Xalan-C evaluates $seg1, it doesn't use the value of $part,
although $part is already resolved.

The stylesheet can be tested with any xml file.

----------------------------

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:param name="part" select="'xyz'"/>

<xsl:param name="seg1">
<xsl:call-template name="evaluate"/>
</xsl:param>

<xsl:template name="evaluate">
<xsl:element name="{$part}"/>
</xsl:template>

</xsl:stylesheet>






_______________________________________________________
Tired of slow Internet? Get @Home Broadband Internet
http://www.home.com/xinbox/signup.html