Input.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<output>
<orders>
<order>
<id>1</id>
<number>10002</number>
<type>Loading</type>
<date>2013-01-01T02:30:00</date>
</order>
<order>
<id>2</id>
<number>10003</number>
<type>Loading</type>
<date>2013-01-01T010:30:00</date>
</order>
</orders>
<quantities>
<quantity>
<id_order>1</id_order>
<unit>KG</unit>
<value>1000</value>
</quantity>
<quantity>
<id_order>2</id_order>
<unit>PAL</unit>
<value>3</value>
</quantity>
</quantities>
</output>
Output.xml should look like this
<?xml version="1.0" encoding="ISO-8859-1"?>
<output>
<orders>
<order>
<id>1</id>
<number>10002</number>
<type>Loading</type>
<KG>1000</KG>
<PAL>3</PAL>
<M3>1.5</M3>
</order>
<order>
<id>2</id>
<number>10003</number>
<type>Loading</type>
<KG>2000</KG>
<PAL>4</PAL>
</order>
</orders>
</output>
What is the format of XSLT file I need to apply ?
ps: ignore this line, sTu!"#id SO asks me to write more text in this post thinking its all code. ignore this line, sTu!"#id SO asks me to write more text in this post thinking its all code.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…