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

RE: combining the children of similar nodes under one

Subject: RE: combining the children of similar nodes under one node
From: "Andreas L. Delmelle" <a_l.delmelle@xxxxxxxxxx>
Date: Sun, 7 Mar 2004 20:47:06 +0100
combining names for children
> -----Original Message-----
> From: Andreas L. Delmelle
> > -----Original Message-----
> > From: David Montalvo
> >
> > Thanks Andreas. I'll give it a try. Is that method you suggested known
> > as the Meunchian method? I remember reading about it somewhere...
>
> Indeed it is.
>

Just in case you want a bit more explanation WRT the workings of this
method:

The two keys are used mainly to compare the id of the first node returned by
them for a given lookup-value, with the node being selected/processed. The
definition of the first variable is an example of this. It gets to contain
one product node for each of the different product names in the source file.
The prod-by-name key is then used a second time in the product-merge
template, to grab all nodes with the same name as the selected node from the
distinct-prods variable. In product-list template finally, all style or type
nodes are selected in a way similar to the construction of the
distinct-prods variable (comparing id with the first node returned by the
key for the given lookup-value).

The only thing I wasn't sure about:
In this case, when there are more than one style/type nodes with the same
value for a given product name, the first one in source document order will
be the one that's preserved...


Cheers,

Andreas


 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.