|
Subject: Re: [xsl] FW: Basic XSLT ;-) From: Geert Josten <Geert.Josten@xxxxxxxxxxx> Date: Fri, 14 Jan 2005 14:11:13 +0100 |
You could try doing:
<xsl:template match="foo">
<xsl:variable name="value">
<xsl:copy-of select="text()" />
</xsl:variable> <xsl:if test="contains($value, 'Value')">
...
</xsl:if>
</xsl:template><xsl:template match="foo">
<xsl:variable name="value">
<xsl:apply-templates select="node()" mode="filter-value" />
</xsl:variable> <xsl:if test="contains($value, 'Value')">
...
</xsl:if>
</xsl:template><xsl:template match="*" mode="get-value">
<xsl:if test="self::bar">
<xsl:apply-templates select="node()" mode="get-value" />
</xsl:if>
</xsl:template>I am struggeling with a really basic XSL task. I guess I am missin something. I need a template that matches the text values of all foo element whose original value is 'Value'. The original value should be normalized as I want to match e.g.:
<foo> Text </foo>
or
<foo>Text </foo>
or
<foo name="bar"> Text <child>...</child> </foo>
I tried without success: ------------------------
<xsl:template match="foo[normalize-space(text())='Value']"> .... </xsl:template>
Please help!! ;-)
-- Geert.Josten@xxxxxxxxxxx IT-consultant at Daidalos BV, Zoetermeer (NL)
http://www.daidalos.nl/ tel:+31-(0)79-3316961 fax:+31-(0)79-3316464
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] FW: Basic XSLT ;-), David Carlisle | Thread | [xsl] Comparing two XML documents, Rahil Qamar Yahoo |
| Re: [xsl] FW: Basic XSLT ;-), David Carlisle | Date | Re: [xsl] Trying to Achieve inside/, Geert Josten |
| Month |