xsl-list
[Top] [All Lists]

[xsl] Finding the last ancestor of a list

2006-10-25 17:00:05
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>