[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Finding the last ancestor of a list

Subject: Finding the last ancestor of a list
From: "Fleetwood, Brett \(DCS\)" <fleetwood.brett2@xxxxxxxxxxxxxxxx>
Date: Thu, 26 Oct 2006 09:29:29 +0930
 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

Current Thread

Back To School Sale!

Save 30% off all Stylus Studio 2008 Products when you purchase from our Online Shop.

Offer ends August 31, 2008.

Coupon Code
TRTY-C4JV-OFF

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.