Re: Count Ancestors Up To But Not Including a Given Ty
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:f="data:,f" >
These are very helpful examples--I find the select="x,f(x)" construct quite elegant (and familiar now that I remember my old lisp/DSSSL training).
But I realize I didn't give the full story, which is that the number of ancestors between a given list item and its parent list is variable, in that DITA allows both:
So a simple "../.." won't be reliable. (Although one could argue that the intervening <p> should restart the list sequence--I'm not sure the DITA 1.1 spec is clear on that point.)
In thinking about it more I don't think there's a way to generalize this to a query that is not DTD-specific since you have to know which intervening elements to ignore and which to respect.
-- Eliot Kimber Senior Solutions Architect "Bringing Strategy, Content, and Technology Together" Main: 610.631.6770 www.reallysi.com www.rsuitecms.com
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