Hello
I want to analyse the XML output of the Directions Bing Maps API.
That's because I need to calculate km in each countries for the returned road.
My problem boils down to create an XSL to transform an XML like this one:
<trip><step> <road>aaa</road> <country>XXX</country> </step><step> <road>bbb</road> </step><step> <road>ccc</road> <entering>YYY</entering> </step><step> <road>ddd</road> </step><step> <road>eee</road> </step><step> <road>ggg</road> <entering>ZZZ</entering> </step><step> <road>hhh</road> </step></trip>
into an XML like that one:
<trip><step> <road>aaa</road> <country>XXX</country> </step><step> <road>bbb</road> <country>XXX</country> </step><step> <road>ccc</road> <country>YYY</country> </step><step> <road>ddd</road> <country>YYY</country> </step><step> <road>eee</road> <country>YYY</country> </step><step> <road>ggg</road> <country>ZZZ</country> </step><step> <road>hhh</road> <country>ZZZ</country> </step></trip>
In the final XML, each step of a trip is allocated to a country.
Using other fields I will easily be able to summarize km (miles) in each country.
I would like to perform the transformation with an XSL.
Would you know how to do that?
With my thanks and best regards,
Michel