Really strange, I often switch between Tomcat and Jetty when working with Cocoon, but I don't often use document(). But IMO it's not a problem of the servlet container (as I don't know how it should be related), but more a problem with endorsed libs. Are you using Jetty delivered with Cocoon or an own one? Do you have something like java.endorsed.libs configured (if not using Jetty delivered with Cocoon 2.1)? To be sure, simply try the environment check stylesheet:
http://xml.apache.org/xalan-j/faq.html#environmentcheck.


Joerg

On 05.01.2004 14:52, Jan Hoskens wrote:

Hi,

I'm using a stylesheet with a variable that contains a nodeset
variable:

<xsl:variable name="Lookup"
select="document('../resources/Lookup.xml')/Lookup"/>

The path in the document() function is relative and does work under
Tomcat. If I switch to jetty, an exception occurs when I want to use
the variable as a nodeset:

<xsl:if test="$Lookup/Item">

FATAL_E (2004-01-05) 13:48.36:637   [core.xslt-processor]
(/cocoontest/index.html) PoolThread-4/TraxErrorHandler: Error in
TraxTransformer: file:/d:/cocoontest/stylesheets/wdc2html.xsl; Line
101; Column 54; ; SystemID:
file:/d:/cocoontest/stylesheets/wdc2html.xsl; Line#: 101; Column#: 54
 javax.xml.transform.TransformerException:
java.lang.ClassCastException

It seems that under Jetty, the variable does not contain the xml
document at all and gives an exception because the test expects a
nodeset but does not receive one?

Why doesn't Jetty give me the document as Tomcat does?? Or is it
wrong to use paths relative to the xsl document in the xsl itself?


Thankzz,


Jan


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to