|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Finding the last ancestor of a list
G'day all, I've got a XHTML unordered list <ol> structure. Inside the <li> tags there can potentially be many formatted tags such as <em>, <b>, etc. When im matching on the <br> tag inside a <ol><li><...><...><br> I want to find out if the ancestor <li> is the last of the <ol>. This is my template that isn't working. I'm using fop-0.20.5 <xsl:template match="br[generate-id()=generate-id(key('b',generate-id(ancestor::*[self ::li][1]))[last()])]"> <xsl:if test="ancestor::li[position()=last()]"> <fo:block><fo:leader/></fo:block> </xsl:if> ... </xsl:template> I'm not sure exactly how the expression ancestor::li works? Does it match on all the <li> of the <ul> or just the one that is directly related? Brett Fleetwood
|
Back To School Sale!Save 30% off all Stylus Studio 2008 Products when you purchase from our Online Shop. 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
|






