cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Navneet Joneja <Navneet.Jon...@Techspan.com>
Subject Wierd ESQL error continued.
Date Tue, 24 Apr 2001 23:06:26 GMT
OK, so I sat and looked at the source of the ESQL.xsl file (the main ESQL
processor and put this in a new stylesheet:
<xsl:param name="XSP-ENVIRONMENT"/>
<xsl:param name="XSP-VERSION"/>
<xsl:param name="filename"/>
<xsl:param name="language"/>

<xsl:variable name="cocoon1-environment">Cocoon 1</xsl:variable>
<xsl:variable name="cocoon2-environment">Cocoon 2</xsl:variable>

<xsl:variable
name="cocoon1-xsp-namespace-uri">http://www.apache.org/1999/XSP/Core</xsl:va
riable>
<xsl:variable
name="cocoon2-xsp-namespace-uri">http://apache.org/xsp</xsl:variable>

<xsl:variable name="environment">
  <xsl:choose>
    <xsl:when test="starts-with($XSP-ENVIRONMENT,$cocoon1-environment)">
      <xsl:text>cocoon1</xsl:text>
    </xsl:when>
    <xsl:when test="starts-with($XSP-ENVIRONMENT,$cocoon2-environment)">
      <xsl:text>cocoon2</xsl:text>
    </xsl:when>
    <xsl:otherwise>
      <xsl:text>cocoon2</xsl:text>
    </xsl:otherwise>
  </xsl:choose>
</xsl:variable>



	<xsl:template match="/page">
	<page>
		<xsl:value-of select="$XSP-ENVIRONMENT"/>
		<xsl:value-of select="$environment" />
	</page>
	</xsl:template>
</xsl:stylesheet>


PTOOI!!!! It threw up saying that XSP-ENVIRONMENT was being referenced out
of context or without definition. 
However, if I moved the variable definition for $environment into the
template, it worked fine.

Has anyone seen this happen? I don't want to change the ESQL source code
unless it needs to be changed... and anyway this error just does not make
sense! What am I missing?
Thanks!
- Navneet

-----Original Message-----
From: Navneet Joneja [mailto:Navneet.Joneja@Techspan.com]
Sent: Tuesday, April 24, 2001 3:22 PM
To: 'cocoon-users@xml.apache.org'
Subject: Wierd ESQL error


Has anyone seen this before? I just cant seem to get ESQL running....

org.apache.xalan.xslt.XSLProcessorException: pattern = '$environment =
'cocoon1''
VariableReference given for variable out of context or without definition!
Name = environment
	at
org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1710)
	at
org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1674)
	at
org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:703)
	at
org.apache.cocoon.transformer.XalanTransformer.transform(XalanTransformer.ja
va:107)
	at
org.apache.cocoon.processor.xsp.XSPLogicsheet.apply(XSPLogicsheet.java:102)
	at
org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:445)
	at org.apache.cocoon.Engine.handle(Engine.java:384)
	at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:213)
	at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:1265)
	at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1622)
	at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
	at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

TIA!
- Navneet

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message