Subject: [xsl] help with select From: "Jiang, Peiyun " <Peiyun.Jiang@xxxxxxxxxxxxxx> Date: Thu, 9 Feb 2006 11:20:28 -0500 |
I'm trying to made the following code work: ./footnote|//footnote[@id=./@fnref] I want to select the child footnote element of author and any footnote that its id attribute matches the fnref attribute of the author. In footnote[@id=./@fnref], is "." referring to author or to footnote? How do you refer author? Thanks. Peiyun <xsl:template match="author"> <!-- something here --> <xsl:choose> <xsl:when test="count(./footnote|//footnote[@id=./@fnref]) = 1"> <xsl:apply-templates select="./footnote|//footnote[@id=./@fnref]"/> </xsl:when> <xsl:when test="count(./footnote|//footnote[@id=./@fnref]) > 1"> <xsl:for-each select="./footnote|//footnote[@id=./@fnref]"> <xsl:choose> <xsl:when test="position() = last()"> <xsl:apply-templates select="." /> </xsl:when> <xsl:when test="position() != last()"> <xsl:apply-templates select="." /> <sup>,<xsl:text> </xsl:text></sup> </xsl:when> </xsl:choose> </xsl:for-each> </xsl:when> </xsl:choose> <!-- some other things here --> </xsl:template>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Printing all child bachel, cknell | Thread | RE: [xsl] help with select, Michael Kay |
Re: [xsl] Printing all child bachel, Jon Gorman | Date | [xsl] Handling CDATA element, Thorsten Scherler |
Month |