[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: applying templates to ancestor nodes without repro
Jarom,
If I understand you correctly, the error is in your XPath: At 01:13 PM 4/10/2002, you wrote: <xsl:apply-templates select="node()[ancestor::l]" mode="noApps"/> This doesn't select ancestors. Fully expanded, it is equivalent to child::node()[ancestor::l] or "all child nodes that have an ancestor l". (Absent an axis specifier, XPath assumes the child axis. The predicate acts to filter the node set: so your XPath does not read "nodes that are ancestor l" but rather "[child] nodes that *have* ancestor l" (or to be really persnickety, "[child] nodes for whom the expression 'ancestor::l' is true, i.e. for whom, acting as the context node, the set of nodes ancestor::l is not empty"). I think what you want is merely select="ancestor::l", which selects all l ancestors (each app should have only one). Good luck-- Wendell
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
|