Hi,
> I need to tranform an element value to an attribute value:
>
> input:
> <element>
> <element.name>hello</element.name>
> </element>
>
> output:
> <element name="hello"/>
>
>
> I have no idea ho to refer the element's value in an xsl:template
E.g.
<xsl:template match="*">
<xsl:copy>
<xsl:for-each select="*[contains(local-name(), '.')]">
<xsl:attribute name="{substring-after(local-name(), '.')}">
<xsl:value-of select="." />
</xsl:attribute>
</xsl:for-each>
</xsl:copy>
</xsl:template>
Jarno - Xorcist: Xorcist (Bleeding mix)
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- RE: Element value
- Jarno . Elovirta - Thu, 21 Nov 2002 03:43:33 -0500 (EST) <=
- Laura - Thu, 21 Nov 2002 05:29:57 -0500 (EST)
- <Possible follow-ups>
- "Brož Jiří, Ing. 11030" - Thu, 21 Nov 2002 04:00:50 -0500 (EST)
- bryan - Thu, 21 Nov 2002 04:43:55 -0500 (EST)
- bryan - Thu, 21 Nov 2002 04:48:41 -0500 (EST)
|
|