I'm trying to parse an XML document with XSLT, but I'm really newbie with this.
I already generated an XML document like this:
<DOC>
<FORM>VI0CBCNE</FORM>
<DAY>23</DAY>
<FORM>AP0002</FORM>
<BAR>109130000005</BAR>
<CODBAR>109130000005</CODBAR>
<FORM>AP0001</FORM>
</DOC>
And I want to transform it into something like this:
<DOC>
<DOC_FORM>
<FORM>VI0CBCNE</FORM>
<DAY>23</DAY>
</DOC_FORM>
<DOC_FORM>
<FORM>AP0002</FORM>
<BAR>109130000005</BAR>
<CODBAR>109130000005</CODBAR>
</DOC_FORM>
<DOC_FORM>
<FORM>AP0001</FORM>
</DOC_FORM>
</DOC>
The number of FORM nodes could change, also the number of nodes between FORMS.
I'm not even close of the solution, so I can't share my XSL. Could someone help me with at least a clue with what I can do? I'm using apache camel and an XSLT 2.0 processor.