xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Rename element


Subject: Re: [xsl] Rename element
From: Ragulf Pickaxe <ragulf.pickaxe@xxxxxxxxx>
Date: Fri, 4 Nov 2005 14:15:29 +0100

Hi Shailesh,


>
> How do i change script to scriptin element.


This is straightforward. Everytime you encounter a script element, you
create a scripting element. Then you copy the attributes of the
current script element (the one you have encountered). If you know
that script elements will have no children, you will not need
<xsl:apply-templates/> in the template below.

<xsl:template match="script">
  <scripting>
    <xsl:copy-of select="@*"/> <!-- copies all attribute to new element -->
    <xsl:apply-templates/> <!-- Applies templates to other child elements -->
  </scripting>
</xsl:template>

Regards,
Ragulf Pickaxe :-)


Current Thread
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor