[Home] [By Thread] [By Date] [Recent Entries]
Juan,
Try (//XX)[1] And hope that your processor is optimized to stop after it gets the first one rather than traversing the entire tree. NB, this is not the same as //XX[1], which translates as /descendant-or-self::node()/child::XX[1] where the predicate operates only on the second step (the child step), so you get all XX elements that are the first XX child of their parents -- not what you want. Grouping it as (/descendant-or-self::node()/child::XX)[1] (or using the abbreviated form as above), solves that particular problem. If you have namespace-qualified elements around and you want any namespace but local-name 'XX' you'll have to do (//*[local-name()='XX'])[1] Good luck, Wendell At 04:17 PM 8/23/2002, you wrote: Hello: ====================================================================== 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
|

Cart



