This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Selecting descendent text node


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]