clone node - xsl

ricky (archive)

Usenet Archive
Joined
Jul 27, 2001
Messages
52
Reaction score
0
i have this xml document:
<order>
<item occur="unbounded">
<ref>122</ref>
<name>bla bla</name>
</item>
<item occur="unbounded">
<ref>122</ref>
<name>bla bla</name>
</item>
</order>

and i want with xslt transform to:

<order>
<item occur="unbounded">
<ref>122</ref>
<name>bla bla</name>
</item>
<item occur="unbounded">
<ref>122</ref>
<name>bla bla</name>
</item>
<item occur="unbounded">
<ref> </ref>
<name> </name>
</item>
</order>

- i want to clone a node wanever find a occur attribute. But i want that the rest stays intact. the occur attribute can be in a deepiest node...and the name of the nodes can be others...

thanks in advance
ricky
 

Martin Honnen

Usenet Archive
Joined
Apr 8, 2000
Messages
6,174
Reaction score
0
ricky said:
i have this xml document:
<order>
<item occur="unbounded">
<ref>122</ref>
<name>bla bla</name>
</item>
<item occur="unbounded">
<ref>122</ref>
<name>bla bla</name>
</item>
</order>

and i want with xslt transform to:

<order>
<item occur="unbounded">
<ref>122</ref>
<name>bla bla</name>
</item>
<item occur="unbounded">
<ref>122</ref>
<name>bla bla</name>
</item>
<item occur="unbounded">
<ref> </ref>
<name> </name>
</item>
</order>

- i want to clone a node wanever find a occur attribute. But i want that the rest stays intact. the occur attribute can be in a deepiest node...and the name of the nodes can be others...

It is not clear to me what you want to achieve. Your input has two <item> elements, your output three therefore I don't know which <item> you want to be cloned.
 

ricky (archive)

Usenet Archive
Joined
Jul 27, 2001
Messages
52
Reaction score
0
I want to clone the last item, but with no text inside the nodes. And the rest of the document i must retain intact

thanks!
ricky
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,042
Messages
3,104,223
Members
248,131
Latest member
Tonypshaw1

Latest Threads

Top