Saturday 15 August 2015

XSLT insert subset of source -


I'm having trouble with XSLT: Children in the source node need to be copied in the resulting structure. / P>

  & lt; Source & gt; & Lt; Sub1 & gt; & Lt; ID & gt; Val & lt; / Id & gt; & Lt; Keynode & gt; & Lt; Name & gt; NAME1 & lt; / Name & gt; & Lt; Price & gt; Value 1 and lt; / Value & gt; & Lt; / Keynode & gt; & Lt; Keynode & gt; & Lt; Name & gt; NAME2 & lt; / Name & gt; & Lt; Price & gt; Value2 & lt; / Value & gt; & Lt; / Keynode & gt; & Lt; Keynode & gt; & Lt; Name & gt; NAME3 & lt; / Name & gt; & Lt; Price & gt; VALUE3 & lt; / Value & gt; & Lt; / Keynode & gt; & Lt; Keynode & gt; & Lt; Name & gt; NAME4 & lt; / Name & gt; & Lt; Price & gt; VALUE4 & lt; / Value & gt; & Lt; / Keynode & gt; & Lt; / Sub1 & gt; & Lt; / Source & gt;   

I just need to move the contents of the sub structure into a new structure:

    

I have simplified some things, but this issue needs to be copied to the children specified by an XPath (namespace, attributes, children, etc.-deep copy). From the root in this example: / source / sub1 / *

Thanks for the help.

Find the correct post.

  & lt; Xsl: copy-of select = "/ source / sub1 / *" / & gt;    

No comments:

Post a Comment