|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] replace attribute name
Hi there
I have the following Problem. I have an xml file with the follwing structure: <document> <article> <head></head> <text> <paragraph></paragraph> <paragraph></paragraph> </text> <date> <day></day> <month></month> <year></year> </date> <source></source> <portal></portal> <ID number="000.000"/> </article> <article> [...] </article> [...] </document> and I want to replace the name of the attribute of ID ("number") with "idnumber" and leave the whole other contend like it is. So, I want a document with the same contend expect the attributename ... Copying the contend was not the problem (I hope I did it in a correct way): <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml"/> <xsl:variable name="finance" select="document('finance.xml')"/> <xsl:template match="/">
<document>
<xsl:for-each select="//document/article">
<xsl:copy-of select="."/>
</xsl:for-each>
</document>
</xsl:template></xsl:stylesheet> but how can I repalce the attribute ... would be great If someone could help me.... greetings Florian Bauer 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








