Re: Selecting descendent text node

Subject: Re: Selecting descendent text node
From: Warren Hedley <w.hedley@xxxxxxxxxxxxxx>
Date: Fri, 15 Sep 2000 13:19:50 +1200
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


Current Thread