On Thursday, Dec 5, 2002, at 02:54 US/Pacific, Ugo Cei wrote:

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 = ''">
The logicsheet makes use of some XSLT standard functions like translate() to translate the XPath expression into a variable name. It might be that these functions are either not implemented or are broken. Perhaps a little standalone test which uses the construct from jpath.xsl will show what the problem is.

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?
I was using a quite old version of Cocoon on my machine, which worked fine with Xalan 2.3.1. After I updated from CVS yesterday, I now get the same problems as you get! Luckily I still have the old source code tree around, so I can do some more work if needed.

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.
I'll investigate this myself as well. Please let me know if you find anything.

Best regards,
Ovidiu

--
Ovidiu Predescu <[EMAIL PROTECTED]>
http://webweavertech.com/ovidiu/weblog/


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



Reply via email to