Re: [xsl] JDK 1.4 <> 5.0 transformation compatibility

Subject: Re: [xsl] JDK 1.4 <> 5.0 transformation compatibility
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 15 Jun 2007 13:37:37 +0100
I can't comment on the different results on different processors, but
your use of key() looks suspect. In Muenchian grouping you typically use
equivalent expressions in the use attribute of the key, and in the
generate-id(key(...)) construct in the select filter.

but you have:

    <xsl:key name="IRNCategory" match="IR/N" use="concat(generate-id(..) , string(Category))"/>

so the key is using the concatenation of an id of an IR (the parent
of N) node and the string value of the N's first Category child.

but later you have:

                    <xsl:variable name="currentIR" select="."/>
so I assume the current node is an IR nnode
                    <xsl:variable name="categories"
generate-id(key('IRNCategory', concat(generate-id(.) ,

inside the predicate  . is an N node so here the key is looking up the
key using the concatenation of the id of N and the string value of its
first Category child. So I'd expect this call on key() never to return
any nodes.

I would guess that you want concat(generate-id(current()) here or
concat(generate-id(.) in xsl:key definition (depending on what the
grouping criterion is)


The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 

Current Thread