xml-xalan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claude Warren <cla...@histio.org>
Subject Variable accessed before it is bound?
Date Mon, 07 Jan 2002 03:51:18 GMT
I have a transform that has been running under Cocoon 1.8.2 just fine. 
However, I have a replacement for Cocoon this is having trouble.

I am using Xalan 2.2.D11
and JAXP

with the following features turned on:
http://xml.org/sax/features/namespaces
http://xml.org/sax/features/namespace-prefixes
http://apache.org/xml/features/allow-java-encodings

The EnvironmentCheck().checkEnvironment() report is listed below.

The error I get is:

; SystemID: http://localhost/common/html/document_list.xsl; Line#: 224; 
Column#: 57
javax.xml.transform.TransformerException: Variable accessed before it is 
bound!
...

The template in question is listed below.  The error points to the 
position just after the first "<xsl:value-of select="$sep"/>".  I assume 
the problem is that xalan thinks that $sep is undefined even though it 
is defined as a param to this named template.  Any ideas for solutions 
to workarounds that do not involve changing the parameter name as this 
is a working template in a running system into which I am attempting to 
introduce a new application?

Many Thanks,
Claude Warren

----- Start of XSL -----


<xsl:template name="reference-not-book">
	<xsl:param name="sep">.</xsl:param>
	<xsl:variable name="pt1">
		<xsl:call-template name="join">
			<xsl:with-param name="p1"><xsl:apply-templates select="author" 
mode="nameonly"/>
				<xsl:if test="article">
					<xsl:text> &quot;</xsl:text>
					<xsl:call-template name="change-quotes">
						<xsl:with-param name="content"><xsl:apply-templates 
select="article"/></xsl:with-param>
					</xsl:call-template><xsl:value-of select="$sep"/><xsl:text>&quot;
</xsl:text>
				</xsl:if>
			</xsl:with-param>
			<xsl:with-param name="sep"><xsl:text> </xsl:text></xsl:with-param>
			<xsl:with-param name="p2"><xsl:apply-templates select="title" 
mode="reference"/></xsl:with-param>
		</xsl:call-template>
	</xsl:variable>	
	<xsl:variable name="pt2">
		<xsl:call-template name="join">
			<xsl:with-param name="p1"><xsl:copy-of select="$pt1" /></xsl:with-param>
			<xsl:with-param name="sep">, </xsl:with-param>
			<xsl:with-param name="p2"><xsl:apply-templates select="vol" 
mode="reference-not-book" /></xsl:with-param>
		</xsl:call-template>
	</xsl:variable>
	<xsl:variable name="pt1">
		<xsl:call-template name="join">
			<xsl:with-param name="p1"><xsl:copy-of select="$pt2" /></xsl:with-param>
			<xsl:with-param name="sep">, </xsl:with-param>
			<xsl:with-param name="p2"><xsl:apply-templates select="date" 
mode="reference" /></xsl:with-param>
		</xsl:call-template>
	</xsl:variable>
	<xsl:variable name="pt2">
		<xsl:call-template name="join">
			<xsl:with-param name="p1"><xsl:copy-of select="$pt1" /></xsl:with-param>
			<xsl:with-param name="sep">, </xsl:with-param>
			<xsl:with-param name="p2"><xsl:apply-templates select="section" 
mode="reference-not-book" /></xsl:with-param>
		</xsl:call-template>
	</xsl:variable>
	<xsl:variable name="pt1">
		<xsl:call-template name="join">
			<xsl:with-param name="p1"><xsl:copy-of select="$pt2" /></xsl:with-param>
			<xsl:with-param name="sep">, </xsl:with-param>
			<xsl:with-param name="p2"><xsl:apply-templates select="page" 
mode="reference" /></xsl:with-param>
		</xsl:call-template>
	</xsl:variable>
	<xsl:call-template name="join">
		<xsl:with-param name="p1"><xsl:copy-of select="$pt1" /></xsl:with-param>
		<xsl:with-param name="sep">, </xsl:with-param>
		<xsl:with-param name="p2"><xsl:apply-templates select="col" 
mode="reference-not-book" /></xsl:with-param>
	</xsl:call-template>
</xsl:template>

----- End of XSL -----


----- Start of Environment Check -----

   Environment: #---- BEGIN writeEnvironmentReport($Revision: 1.7 $): 
Useful properties found: ----
java.version=1.3.0
#---- BEGIN Listing XML-related jars in: foundclasses.java.class.path ----
xalan.jar-apparent.version=xalan.jar WARNING.present-unknown-version
xalan.jar-path=/home/httpd/classes/xalan/xalan.jar
xalanj1compat.jar-path=/home/httpd/classes/xalan/xalanj1compat.jar
xalanj1compat.jar-apparent.version=xalanj1compat.jar present-unknown-version
xalansamples.jar-apparent.version=xalansamples.jar present-unknown-version
xalansamples.jar-path=/home/httpd/classes/xalan/xalansamples.jar
xalanservlet.jar-apparent.version=xalanservlet.jar present-unknown-version
xalanservlet.jar-path=/home/httpd/classes/xalan/xalanservlet.jar
xerces.jar-path=/home/httpd/classes/xalan/xerces.jar
xerces.jar-apparent.version=xerces.jar from xalan-j_2_2_D10 or 
xerces-1_4_3.bin
xml.jar-apparent.version=xml.jar present-unknown-version
xml.jar-path=/home/httpd/classes/xalan/xml.jar
#----- END Listing XML-related jars in: foundclasses.java.class.path -----
version.JAXP=1.1
java.ext.dirs=/opt/IBMJava2-13/jre/lib/ext
version.crimson=not-present
version.SAX=2.0
java.class.path=/usr/lib/apache/ApacheJServ.jar:/home/httpd/classes/activation.jar:/home/httpd/classes/collections.jar:/home/httpd/classes/mail.jar:/home/httpd/classes/mm.mysql-2.0.2-bin.jar:/home/httpd/classes/servlet-2.0.jar:/home/httpd/classes/histiolib.jar:/home/httpd/classes/cryptix32.jar:/usr/cocoon/bin/cocoon.jar:/home/httpd/classes/xenos.jar:/home/httpd/classes/histio.xalan.ext.jar:/home/httpd/classes/jakarta-oro-2.0.4.jar:/home/httpd/classes/log.jar:/home/httpd/classes/logEnglish.jar:/home/httpd/classes/xalan/BCEL.jar:/home/httpd/classes/xalan/bsf.jar:/home/httpd/classes/xalan/java_cup.jar:/home/httpd/classes/xalan/JLex.jar:/home/httpd/classes/xalan/runtime.jar:/home/httpd/classes/xalan/stylebook-1.0-b3_xalan-2.jar:/home/httpd/classes/xalan/xalan.jar:/home/httpd/classes/xalan/xalan2doc.jar:/home/httpd/classes/xalan/xalanj1compat.jar:/home/httpd/classes/xalan/xalansamples.jar:/home/httpd/classes/xalan/xalanservlet.jar:/home/httpd/classes/xalan/xerces.jar:/home/httpd/
classes/xalan/xml.jar:/home/httpd/classes/lib/xslt.jar:/usr/cocoon/lib/sax-bugfix.jar:/usr/cocoon/lib/servlet_2_2.jar:/usr/cocoon/lib/turbine.jar:/usr/cocoon/lib/w3c.jar:/usr/cocoon/lib/xt.jar
version.xerces=Xerces 1.4.3
sun.boot.class.path=/opt/IBMJava2-13/jre/lib/rt.jar:/opt/IBMJava2-13/jre/lib/i18n.jar:/opt/IBMJava2-13/jre/classes
version.DOM.draftlevel=2.0fd
version.xalan2=Xalan;Java;Xalan Java 2.2.D11;
version.DOM=2.0
version.xalan1=not-present
#----- END writeEnvironmentReport: Useful properties found: -----
# YAHOO! Your environment seems to be OK.

----- Start of Environment Check -----


Mime
View raw message