I have the following XML data. I have no control on the structure of this data, this is how I’m receiving it.
<data>
<row>
<value name="CustomerID">1</value>
<value name="CustomerName">Joe</value>
<value name="Cost">22.50</value>
</row>
<row>
<value name="CustomerID">1</value>
<value name="CustomerName">Joe</value>
<value name="Cost">55.50</value>
</row>
<row>
<value name="CustomerID">2</value>
<value name="CustomerName">Jane</value>
<value name="Cost">10</value>
</row>
<row>
<value name="CustomerID">2</value>
<value name="CustomerName">Jane</value>
<value name="Cost">13.50</value>
</row>
<row>
<value name="CustomerID">3</value>
<value name="CustomerName">Jim</value>
<value name="Cost">50</value>
</row>
</data>
I need to use XSLT v1.0 to display the data grouped by Customer ID and with a total for each customer. I’ve tried searching many articles but nothing has this kind of strange structure.
Use:
Output: