[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

replace attribute name

Subject: replace attribute name
From: Florian Bauer <mail@xxxxxxxxxxxx>
Date: Tue, 22 Apr 2003 11:45:39 +0200
replace attribute
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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.