xsl-list
[Top] [All Lists]

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

2007-06-15 05:52:32
Hi David,

you are right, but it's my failure, because it happend when reducing the example for the mail to the minimum. Actually I was using generateId($currentIR) in that line. The original transformation works here - but only in Xalan.

Kind regards,
Kai


David Carlisle schrieb:
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"
                        select="N[generate-id(.)=
generate-id(key('IRNCategory', concat(generate-id(.) ,
string(Category)))[1])]/Category"/>

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)

david

________________________________________________________________________
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. ________________________________________________________________________

--~------------------------------------------------------------------
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>
--~--



--~------------------------------------------------------------------
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>
--~--