|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Finding the closest node (was Re: inconsistent Precedi
Jeni Tennison wrote: [...] When you collect together all the preceding-siblings of a node, and handle them in document order the first of those nodes is the first of the siblings -- the first child of the parent -- not the closest of those siblings.
<xsl:variable name="anchor"
select="ancestor::sidebar |
ancestor::warning |
ancestor::note |
ancestor::orderedlist |
ancestor::itemizedlist |
ancestor::variablelist |
ancestor::varlistentry |
ancestor::listitem |
ancestor::procedure |
ancestor::step |
ancestor::footnote"/>Unfortunately, XPath returns the remotest node (the earliest in document order). For example, if the current node is in a step in a procedure, I need a variable set to that step, not to the whole procedure. Ignore for the moment the possibility of nested lists. ///Peter 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








