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: Grouping in the FAQ (was Re: Conflicting Node Values)


It should already be done (or nearly done). Dave Pawson
has contacted me with sample code that he was writing
up for inclusion in the FAQ.

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
difference is not night and day (at least on our processor).
If Saxon or Xalan have different techniques for merging
node lists and counting nodes, perhaps that might tip the
benefit in the direction of the count() syntax.

Maybe Dave P. can comment on whether the example is
ready to rock-n-roll yet...

______________________________________________________________
Steve Muench, Lead XML Evangelist & Consulting Product Manager
Business Components for Java & XSQL Servlet Development Teams
Oracle Rep to the W3C XSL Working Group
----- Original Message ----- 
From: "Mike Brown" <mike@skew.org>
To: <xsl-list@mulberrytech.com>
Sent: Thursday, May 25, 2000 1:48 PM
Subject: Grouping in the FAQ (was Re: Conflicting Node Values)


| > yes, Mike says he thinks it will be a bit faster
| > 
| >  > file://tracker-id[count(.|key('tid',.)[1])=1]
| 
| *boggle*
| 
| So in 2 weeks' time, members of this list have improved the longstanding
| preceding/following-based grouping algorithm 3 times, using pure XSLT.
| Exciting! 
| 
| Does someone want to volunteer to write a test case with examples of the
| various methods, to replace the Grouping and Grouping & Sorting sections
| of the FAQ?
| 
|    - Mike
| ___________________________________________________________
| Mike J. Brown, software engineer, Webb Interactive Services
| XML/XSL stuff: http://www.skew.org/    http://www.webb.net/
| 
| 
|  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
| 


 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]