This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Selecting descendent text node
- To: xsl-list at mulberrytech dot com
- Subject: Re: Selecting descendent text node
- From: Warren Hedley <w dot hedley at auckland dot ac dot nz>
- Date: Fri, 15 Sep 2000 13:19:50 +1200
- CC: Matthew Bentley <Matthew dot bentley at brookers dot co dot nz>
- Organization: The Department of Engineering Science, The University of Auckland
- References: <C1DD8B5BC729D311A68D00A0C9EA8BF801315A45@mail>
- Reply-To: xsl-list at mulberrytech dot com
Matthew Bentley wrote:
>
> However, XSLT does not allow [predicates] in a template match:
> Is there a way around this?
Not as far as I know. You could always do this.
<xsl:template match="list/text()">
<xsl:choose>
<xsl:when test="position() == 1">
<!-- First text node template contents -->
</xsl:when>
<xsl:otherwise>
<!-- normal list/text() contents -->
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Hope this isn't too little too late!
--
Warren Hedley
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list