|
Subject: RE: [xsl] omitting a piece of text From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Fri, 30 Jan 2009 14:49:49 -0000 |
> In my XSLT I match PW
> <xsl:element name="p">
> <span class="current_ref_in_footnote">
> <xsl:apply-templates select="text()[1]"/>
> </span>
> <xsl:apply-templates/>
> </xsl:element>
>
You're processing text()[1] twice. Simplest (in 2.0) is:
<xsl:element name="p">
<span class="current_ref_in_footnote">
<xsl:apply-templates select="text()[1]"/>
</span>
<xsl:apply-templates select="node() except text()[1]/>
</xsl:element>
Alternatively:
<xsl:element name="p">
<xsl:apply-templates/>
</xsl:element>
<xsl:template match="PW/text()[1]">
<span class="current_ref_in_footnote">
<xsl:value-of select="."/>
</span>
</xsl:template>
Michael Kay
http://www.saxonica.com/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] omitting a piece of text, Jim_Albright | Thread | RE: [xsl] omitting a piece of text, Jim_Albright |
| RE: [xsl] Filtering RSS feed with x, Michael Kay | Date | RE: [xsl] omitting a piece of text, Jim_Albright |
| Month |