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/05 08:50:51 UTC

Top level parameters processing

When I use Xalan C 1.0 to transform following samples, I get:

XSL Error: Could not get variable named part
SAXException Message is : StylesheetRoot.process error

But I cannot find any wrong with the XSL file, or is it a bug in Xalan?

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

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

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

<xsl:template name="evaluate">
	<xsl:for-each select="//text()[string-length()!=1]">
	<xsl:if test="($part*8)>3">
		<xsl:value-of select="."/>-xyz
	</xsl:if>
	</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

XML source:
<?xml version='1.0'?>
<html>
<head>
<title>this is a test page</title>
</head>
<body>
<b>click a hyper link below:</b><br/>
<a href="http://www.sohu.com">Sohu</a> | 
<a href="http://www.aol.com">AOL</a> | 
<a href="http://www.yahoo.com">yahoo</a> | 
<a href="http://www.163.com">neteast</a> | 
<a href="http://www.sina.com.cn">sina</a> | 
<a href="http://www.263.net">capital online</a>
</body>
</html>





_______________________________________________________
Say Bye to Slow Internet!
http://www.home.com/xinbox/signup.html