|
Subject: Re: [xsl] elements to attributes From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Fri, 28 Feb 2003 16:23:53 -0500 |
and I need my result XML document to have all the attributes in each level converted to elements at same level Can there be a generic xsl which looks at all the nodes and does this?
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template><xsl:template match="node()">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template><xsl:template match="@*">
<xsl:element name="{name()}">
<xsl:value-of select="."/>
</xsl:element>
</xsl:template>Cheers, Wendell
___&&__&_&___&_&__&&&__&_&__&__&&____&&_&___&__&_&&_____&__&__&&_____&_&&_ "Thus I make my own use of the telegraph, without consulting the directors, like the sparrows, which I perceive use it extensively for a perch." -- Thoreau
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] elements to attributes, Challa, Harsha | Thread | [xsl] adding additional elements to, Challa, Harsha |
| Re: [xsl] XSL-FO versus PostScript, W. Eliot Kimber | Date | Re: [xsl] XSL-FO versus PostScript, Wendell Piez |
| Month |