This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: using xsl:key to generate list of back references


> will it be much faster, do you think, having a dedicated "same-nodes"
> comparison operator? or just make for more readable XSL?

I'd expect that in Saxon, for this predicate, the difference is noticeable,
but whether it affects the overall stylesheet execution time is anyone's
guess. 

Another technique is 
select="//ptr[count(.|key('targets',@target)[1])=1]">

And incidentally:
select="/descendant::ptr[count(.|key('targets',@target)[1])=1]">

might save you a sort. (Saxon will do this optimisation for you in some
cases but probably not here)

Mike K


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]