|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Grouping repeating elements
Hi Till,
At 10:12 AM 7/11/01, Trevor wrote: [snip] Have a template matching "name". In the body of this template create the target <person> element, copying the matched <name> element, e.g. using copy-of. To handle elements which always appear, use copy-of with following-sibling to get the *first* element after the name of the given type. Get this working first, and see that 'phil' ends up with age 28. Make sure everyone gets just one age! When you have that XPath right, you now have to add a condition that the node you find matches the current <name> node and not a later one. So, add a further condition that the <name> node before the one you have found is the same node as the one matched in your template: use preceding-sibling and generate-id(). And after you've got it working, ask again and we'll tell you about the Advanced Technique using keys (the Topic of the Week) to simplify such "levitation" problems (by which I mean making implicit structures explicit).... Cheers, Wendell ====================================================================== 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
|
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
|

Cart








