Subject: RE: function last() not matching the last element tag
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 26 Jan 2007 16:36:59 -0000
|
> This template will probably work (to match last 'p' element)
>
> <xsl:template match="p[not(following-sibling::p)]">
> <!-- template contents -->
> </xsl:template>
>
Only if all the p elements are siblings (in which case p[last()] would also
work).
The following should always work:
<xsl:template match="p[not(following::p)]">
<!-- template contents -->
</xsl:template>
Michael Kay
|