Hi Ovidiu,

after your mail I tested the transformation with my local copy of Cocoon and the command line Xalan. The default transformed used in Cocoon was XSLTC. So I got different wrong results. Switching Cocoon to Xalan I got the same wrong result in Cocoon and command line.

(See further comments inline.)

Ovidiu Predescu wrote:
Hi Joerg,

[Oddly enough, I couldn't find the message you're quoting.]
It seems that it does not arrive at the mailing list.

On Saturday, Dec 14, 2002, at 06:09 US/Pacific, Joerg Heinicke wrote:

1. The differences between Cocoon and command line result from the usage of XSLTC in Cocoon.
I don't see why Cocoon running in the command line and in the Web environment could affect the XSLTC processor. There shouldn't be any difference in how XSLTC processing happens.

I don't understand. XSLTC and Xalan are different processors and have different bugs as you can see at this example.


2. Further investigations with Xalan (not XSLTC):

  <xsl:key name="JPathExprs" match="jpath:if" use="@test"/>
  <xsl:key name="JPathExprs" match="jpath:when" use="@test"/>
  <xsl:key name="JPathExprs" match="jpath:for-each" use="@select"/>
  <xsl:key name="JPathExprs" match="jpath:value-of" use="@select"/>
In Conclusion:
Xalan seems to have a problem with the key declaration in the way above.

> <xsl:key name="JPathExprs" match="jpath:if | jpath:when | jpath:for-each
> | jpath:value-of" use="concat(@test, @select)"/>

While this seems to work.


The problem with XSLTC is another one. It has problems with 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"/>

But if you divide the both UNIONs in the way below it works too:

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

So if you change both code snippets in jpath.xsl, your Cocoon shell work with the currently used Xalan/XSLTC combination again.

Everything obfuscated now?

Joerg

--

System Development
VIRBUS AG
Fon +49(0)341-979-7419
Fax +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de


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

Reply via email to