Array like processing (Xpath 1 / XSLT 1)
I am building a new XML out of an XML. But first, I have to perform some validation/translation routines and db read that will build the target text() node. This extra process will "suspend" the XSLT processing so I will have to pass a number of times between XMLs to build a new XML. It's like an array handling routine where the array is populated and read back later.
Assuming, XML_01 contains a starting point element like
<value/>
XML_02 will be iterated. On each pass a new node/path is derived
First pass:
<field name="field1">data 1</field>
Second pass:
<field name="field2">data 2</field>
Third pass:
<field name="field3">data 3</field>
On each pass above, XML_01 evolves into
First pass:
<value>
<field name="field1">data 1</field>
</value>
Second pass:
<value>
<field name="field1">data 1</field>
<field name="field2">data 2</field>
</value>
Third pass - final:
<value>
<field name="field1">data 1</field>
<field name="field2">data 2</field>
<field name="field3">data 3</field>
</value>
The reason I'm doing this is because I need to hold more than 40 or so fields and field values. Having a token to hold all of them individually maybe too cumbersome to maintain.
Thanks for the usual guidance!
|