[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Grouping with keys
Dear Silvia,
At 08:11 AM 2/7/2006, you wrote: Hi prakash, Without parsing out your XPath, two things come to mind: * The XPath on the @use attribute isn't syntactically correct, which one can see readily due to the lack of closing brackets or parentheses. This should give you an error. * You'll probably also want to find the *first* or immediately preceding p sibling with the selection criterion, as in generate-id(preceding-sibling::p[pPr/pStyle/@val='Heading1'][1]) -- which you'll need since otherwise you'll get the generated id of the first such p on the axis in document order, which isn't what you want for this grouping idiom. But it may be worth trying Prakash's solution if it's simpler (hence easier to construct, code and maintain). People often assume they have to optimize for performance before they actually do. I recently saw a fabulous old advertisement for a machine tooling manufacturer: "If you know you need new tools and you haven't yet acquired them, you're already paying for them". This applies to programming too. But the converse is also true: if you don't know you need new tools but have already acquired them, you may be paying extra. 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
|