This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Fwd: XSLT: Xpath: sets: position()
- To: xsl-list at lists dot mulberrytech dot com
- Subject: [xsl] Fwd: XSLT: Xpath: sets: position()
- From: Lee Goddard <Home at LeeGoddard dot com>
- Date: Tue, 27 Feb 2001 16:50:35 +0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
Sorry to have wasted your time and bandwidth:
<xsl:when test="*[1]">
Lee
>Date: Tue, 27 Feb 2001 16:47:23 +0000
>To: xsl-list@lists.mulberrytech.com
>From: Lee Goddard <Home@LeeGoddard.com>
>Subject: XSLT: Xpath: sets: position()
>
>Trying to get the first occurrence of an XML
>element marked. Can't be so difficult, can it?
>Please - what am I doing wrong?
>
>I'm doing this:
>
><xsl:appy-templates/>
>
><xsl:template match="/SPC/*">
> <xsl:value-of select="name()"/>
> <xsl:choose>
> <xsl:when test="position()='1'">
> <H3><xsl:value-of select="@TITLE"/></H3>
> </xsl:when>
> <xsl:otherwise>
> <H4><xsl:value-of select="@TITLE"/></H4>
> </xsl:otherwise>
> </xsl:choose>
></xsl:template>
>
>Thanks in anticipation,
>lee
Lee Goddard <mailto:Home@LeeGoddard.com>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list