xsl-list
[Top] [All Lists]

Re: [xsl] probably a XPath mistake

2007-01-30 02:23:47
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/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>