[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Positional tests
Hi Paul,
At 02:26 PM 3/2/2005, you wrote: Here's a true representation of my data. Well if block (2) is always in that spot, when it's there at all, you could try test="ancestor::body/preceding-sibling::block" which tests true if any block elements appear before the body ancestor of the context node, inside its parent (here, the Section2). Is that more like it? Testing for a node's existence is easier than testing if a node is the same node as some other given node -- we just retrieve the node. When a node-set is converted to a Boolean it comes out true if any nodes are in the set, false if it is empty. So testing any XPath location path directly is effectively a test to see whether any nodes exist in the set returned by the expression. Of course, specifying exactly the correct location path for any given situation can be something of an art. First you have to specify the situation.... Cheers, Wendell <book> <Section1> <inline> <block>Anexo</block> (1) </inline> <Section2> <block>Abreviaturas</block> (2) <body> <table> <thead> <tr> <td> <p> <block> (3) <font font-weight="bold">Abbreviation</font> </block> </p> </td> <td> <p> <block> (4) <font font-weight="bold">Description</font> </block> </p> </td> </tr> </thead> <tbody> . . . </tbody> </table> </body> </Section2> </Section1> </book> ====================================================================== 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
|