[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to sort sibling elements based on attribute of
Philip,
At 03:49 PM 7/7/2009, you wrote: Thanks for the solution. The key concept that I learned was how to select and output the preceding and following siblings of <Annotation>. Yes: this is a specific application of a more general principle, namely using XPath to qualify the tree traversal. I omitted a key bit of information in my example: <Root> should have been named <Parent>, since the parent element of Annotation is not the document root element: Okay ... I had (thought I had) read that it was the document element, but that it might not be named "Root", hence the "/*" match pattern in my attempt. In any case, you can do it either way, though mine might sometimes be microseconds faster in addition to being more elegant. :-) Or you could match "*[Application]" instead of "Parent", to match any element that has 'Application' element children. (The complement of the principle of using XPath select expressions to qualify tree traversal is using match patterns to differentiate the handling of nodes being processed.) 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 ======================================================================
|
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
|