[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Hello
I'm puzzling over a problem at the moment that has me stumped. I'm trying to figure out a way to select a node based on an attribute, then copy that attribute to all children of the node i.e.
Sample XML
which I need to convert to
<top.level.node attributeX="123456">
<next element attributeXYZ="654321" attributeX="123456">
<next2element attributeX="123456"> this is some text</next2element>
<next2element attributeX="123456"> this is some more text </next2element>
</nextelement>
</top.level.node>
I have searched the FAQ, and the list archives, but I cant seem to find a suitable way of doing it. Any help would be greatly appreciated.
T.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
[xsl] copying attributes to all child nodes
Subject: [xsl] copying attributes to all child nodes From: Terence Mac Goff <tmacgoff@xxxxxxxxxx> Date: Mon, 26 Jan 2004 11:04:18 +0000 |
Hello
I'm puzzling over a problem at the moment that has me stumped. I'm trying to figure out a way to select a node based on an attribute, then copy that attribute to all children of the node i.e.
Sample XML
<top.level.node attributeX="123456"> <next element attributeXYZ="654321"> <next2element> this is some text</next2element> <next2element> this is some more text </next2element> </nextelement> </top.level.node>
which I need to convert to
<top.level.node attributeX="123456">
<next element attributeXYZ="654321" attributeX="123456">
<next2element attributeX="123456"> this is some text</next2element>
<next2element attributeX="123456"> this is some more text </next2element>
</nextelement>
</top.level.node>
I have searched the FAQ, and the list archives, but I cant seem to find a suitable way of doing it. Any help would be greatly appreciated.
T.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Contains - where containe, Mark Williams | Thread | Re: [xsl] copying attributes to all, George Cristian Bina |
RE: [xsl] Contains - where containe, Michael Kay | Date | RE: [xsl] Contains - where containe, Andrew Welch |
Month |