Subject:Root node renaming and adding attributes Author:KJ KJ Date:01 Sep 2008 09:58 AM Originally Posted: 01 Sep 2008 09:57 AM
Hi,
I have a XML schema below,
<r1 xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<child1>
</child1>
.
.
.
<childX>
<grandchild>
</grandchild>
.
.
</childX>
.
.
<!--childN--->
</r1>
and i am using below XSLT;
Desired O/P (I need to add an attribute, as well as change the root name):
<newroot attrib='Hello' xmlns:msxsl="urn:schemas-microsoft-com:xslt">
</newroot>
but, i am getting this below o/p:
<r1 attrib='Hello' xmlns:msxsl="urn:schemas-microsoft-com:xslt" />
I am not aware of how to change the root name.
I need your help in rewriting schema to generate desired o/p.