cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <u....@cbim.it>
Subject Re: [C2.1] Error in flow samples
Date Thu, 05 Dec 2002 10:54:55 GMT
Marcus Crafter wrote:
>>Yes, I still have the problem, even after I made a cvs update and 
>>recompiled everything. I'm using JDK 1.4.1 under Tomcat 4.1.12, Solaris 
>>8, by the way.
> 
> 
> 	Ok, this is quite strange then. The userprefs example works for me,
> 	jdk 1.4.1, Tomcat 3.3.1, Debian GNU/Linux (unstable).

I hoped I could ignore this problem, but it has appeared also in my 
code, so I've tried debugging it and this is what I've come up with.

In jpath.xsl there's the following code:

<xsl:apply-templates
   select="(//jpath:if | //jpath:when)
           [generate-id(.) = generate-id(key('JPathExprs', @test)[1])]
           | (//jpath:for-each | //jpath:value-of)
           [generate-id(.) = generate-id(key('JPathExprs', @select)[1])]"
   mode="compile"/>

This code is supposed to generate a list of declarations like the following:

CompiledExpression jxpath_title = jxpathContext.compile("title");

However if generates them ONLY if the value of the "test" or "select" 
attribute of the jpath:{if,when,for-each,value-of} element is a simple 
string. It ouptuts NOTHING when the value is something more complicated 
like for instance:

<jpath:when test="check and firstName = ''">

Since I don't see anything wrong with the logicsheet and since it works 
for you, I suspect it has to do with a bug in the XSLT processor.

In my setup, I have moved xalan-2.4.1.jar, xercesImpl-2.1.0.jar, 
xsltc.jar and xml-apis.jar from WEB-INF/lib to 
$CATALINA_HOME/common/endorsed (using Tomcat 4.1.12, JDK 1.4.1_01).

After having fought for a while with XSLT processors for the pipeline 
transformation stage (moving from Xalan to Saxon and back to Xalan 
again), I did not expect to fight another battle just to get XSP to work 
as expected :-(. By the way, which XSLT processor is used for 
transforming XSPs to Java? Is it possible to configure it?

Next thing I'm doing is try to implement a small test case using just a 
source document and a stylesheet outside of Cocoon, transforming the 
former with different processors. Sigh.

	Ugo


-- 
Ugo Cei - http://www.beblogging.com/blog/


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message