[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Jorg:
The high-level skinny on Muenchian grouping:
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.
At 07:57 AM 7/25/2003, you wrote:
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
RE: [xsl] reordering elements based on...
Subject: RE: [xsl] reordering elements based on... From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Fri, 25 Jul 2003 13:25:43 -0400 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] reordering elements based, Jorg Heymans | Thread | [xsl] index, Philippe Dubreuil |
Re: [xsl] Controlling tabular layou, Wendell Piez | Date | Re: [xsl] XPATH to be used in a fo, Wendell Piez |
Month |