|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Re: quick [but difficult] Xpath Question
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
|
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








