[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
> -----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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|