Hello NG,
I have the following XML (simplified) having a variable
number of v-elements:
<record>
<field name="parameter ">
<v0>paramname 0</v0>
<v1>paramname 1</v1>
<v2>paramname 2</v2>
</field>
<field name="parameter value">
<v0>paramvalue0 </v0>
<v1>paramvalue1 </v1>
<v2>paramvalue2 </v2>
</field>
<field name="parameter unit">
<v0>paramunit 0</v0>
<v1>paramunit 1</v1>
<v2>paramunit 2</v2>
</field>
<record>
.... and would like to create the following target XML:
<record>
<field name="paramname 0" value="paramval ue0" unit="paramunit 0"/>
<field name="paramname 1" value="paramval ue1" unit="paramunit 1"/>
<field name="paramname 2" value="paramval ue2" unit="paramunit 2"/>
</record>
I'm working with an identity transformation and the following
templates:
<xsl:template match="record/field[@name='paramete r']">
<!-- (*) -->
</xsl:template>
<xsl:template match="record/field[@name='paramete rvalue']"/>
<xsl:template match="record/field[@name='paramete runit']"/>
My problem is the place marked with (*):
How can I iterate over all v elements and access the homo-
nymous child in the elements for the parameter values and
units?
thanx in advance and kind regards,
Gerald