Re: [xsl] probably a XPath mistake

Subject: Re: [xsl] probably a XPath mistake
From: Nico Van Cleemput <Nicolas.VanCleemput@xxxxxxxx>
Date: Tue, 30 Jan 2007 10:22:36 +0100
Hmm, I will discuss it with our legal departement, because they are already over their heads with sorting out the different licenses that go with the libraries we use and that have to be integrated in our license before we can release a first version.

Anyway, thanks, now I at least know what was going wrong and why it did work in JDK 5. The processor in both JDK 5 and 6 is Xalan I thought, but I can't find any version info about which version is used where.

Greets,
Nico Van Cleemput
Ghent University

On 30 Jan 2007, at 09:58, Michael Kay wrote:

This does look as if the JDK 5 processor had a pretty nasty bug.

The code seems to be written on the assumption that

key('vertex',@from)

will select data from EMBEDDING.XML; but the context node at the time is in
GRAPH.XML, so that is where the key should search. I'm afraid the fix for
this in XSLT 1.0 is tedious: my advice, since you're switching processors
anyway, would be to switch to XSLT 2.0 and Saxon, where you can write


key('vertex', @from, $embedding)

having declared the global variable:

<xsl:variable name="embedding" select="/"/>

Michael Kay
http://www.saxonica.com/

Current Thread