[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: reordering elements based on...

Subject: RE: reordering elements based on...
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 25 Jul 2003 13:25:43 -0400
xpath reordering
Jorg:

The high-level skinny on Muenchian grouping:

1. Establish a way to group the nodes you want grouped
2. Select and process only one (typically the first) of the nodes in each group
3. When you process it, also pick up and process the others in the group

We usually use keys to establish the grouping: it's handy and efficient. (This can also be done with raw XPath, though you'll find performance will degrade on anything but small documents).

Since XPath 1.0 has no direct way to test node identity, the de-duplicating step (2) is usually done with either of two non-obvious techniques:

- compare generate-id of a selected node with the generated id of the first node in the group to which your selected node belongs
- count the nodes in the set formed by the union of a selected node and the first in its group: if it equals 1, they're the same node.


Enjoy,
Wendell

At 07:57 AM 7/25/2003, you wrote:
Up to me now to find out how exactly this muenchian method grouping works.


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.