I need to merge the two nodes street as they have the same:
- father node: city NEW YORK
- same method: modify
- same id: 0
Attributes values must be merged (See the output file at the end of this post)
Here is the input file:
<country>
<state id="NEW JERSEY">
<city id="NEW YORK">
<district id="BRONX" method="modify">
<street id="0" method="modify">
<attributes>
<temperature>98</temperature>
<altitude>1300</altitude>
</attributes>
</street>
<dadada id="99" method="modify" />
<street id="0" method="modify">
<attributes>
<temperature>80</temperature>
<streetnumber> 67 </streetnumber>
</attributes>
</street>
<dididi id="432" method="modify" />
</district>
</city>
</state>
Expected output:
<country>
<state id="NEW JERSEY">
<city id="NEW YORK">
<district id="BRONX" method="modify">
<street id="0" method="modify">
<attributes>
<temperature>80</temperature>
<altitude>1300</altitude>
<streetnumber> 67 </streetnumber>
</attributes>
</street>
<dadada id="99" method="modify" />
<dididi id="432" method="modify" />
</district>
</city>
</state>
</country>
Please help, I am just beginning XSLT