|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Element value
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








