RE: Grouping in the FAQ (was Re: Conflicting Node Values)

Subject: RE: Grouping in the FAQ (was Re: Conflicting Node Values)
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Fri, 26 May 2000 09:56:42 +0100
> Steve Muench writes:
>  > At least for the Oracle XSLT engine the:
>  > 
>  >     generate-id(.) = generate-id(key('tid',.)[1])
>  > 
>  > is slightly faster because it doesn't have to produce
>  > two nodesets to merge and count as does the:
>  > 
>  >     count(.|key('tid',.))=1
>  > 
>  > approach. The latter is definitely shorter and the
> 
> Thats very interesting. Maybe I misinterpret Mike as saying it was
> faster. 

I did say the "union" approach might be marginally faster on Saxon, on
thinking about it again I'm not so sure. I didn't spot that the
generate-id() approach would only look at the first node in the result of
key() whereas the union approach looks at all of them. Would need to measure
to be sure.

If people are going to start using generate-id() like this, though, I ought
to think about speeding it up (if possible, without bloating the tree!)

Mike K


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread