Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: How do I copy the attributes from a node using XSL?

From: Skully@-----------.---------.---
To: NULL
Date: 8/6/2004 1:53:00 AM
Me again,
I have now tried:

<Perind><xsl:value-of select="OCRISKDATA/BZ6/Perindm"/>
<xsl:attribute name="vt"><xsl:value-of 
select="OCRISKDATA/BZ6/Perindm/@vt"/></xsl:attribute>
</Perind>

Which in theory I expect to work. However, no matter what I put in for the 
attribute value, either a simple string or a query, no attribute appears in 
my result.

WHY?!

"Skully" wrote:

> I have a node in my Source doc such as: 
> <Perindm vt="1">12</Perindm>
> I want to transform it to:
> <Perind vt="1">12</Perind>
> 
> i.e. I want to rename the node but keep everything else about it the same 
> especially the attributes
> 
> If I use the following XSL
> <Perind><xsl:value-of select="blabla/blabla/Perindm"/></Perind>
> then I can't get the attributes.
> 
> If I use xsl:copy-of then I get the whole node but can I rename it?
> 
> What I would like is to copy attributes but I don't seem to be able to.
> 
> Help!


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent