[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: container list display problem
Loren,
I hate to catch Mike out (hee :-), but when he writes: I haven't tried to understand your detailed logic but the parent::c02[last()] test looks wrong. A node has exactly one parent so the predicate [last()] is always true. He's forgetting that when a predicate expression is reduced to a simple number (as [last()] would be), it's inferred to be shorthand for [position()=last()], so the problem isn't there. [XPath 2.4] The basic problem of your tests using preceding-sibling:: might be alleviated by shifting to the preceding:: axis. While I know EAD, like Mike I can't see deeply into your problem without seeing an example of source code. (As you know there are many ways to do EAD.) You can test whether the parent of the <did> that houses the <container> has the same number by going up *two* levels -- "../../@n = @n". But it sounds like since the tracking of the microfilm reels has no relation to the XML structure of the source, the preceding:: axis may be a winner. If you want to check ancestors as well as preceding elements (you may), check both preceding:: and ancestor:: axes. Also, problems like yours are often made considerably easier with a two-pass solution. This is especially the case if there's any sorting involved (but it sounds like your stuff is already sorted). Even if this isn't so for you, checking preceding:: can get expensive of processing cycles (the axis goes all the way back to the start of the document), and this can be alleviated by running two passes. For more explicit help, please post a sample of your source (trimmed for clarity) with the applicable bit of stylesheet. Regards, Wendell At 05:42 PM 5/1/2002, you wrote: Michael, ====================================================================== 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
|