Rearranging XML - Urgent.
I am new to XSL. I have the following Input XML.
<books>
<book>
<author>John Smith</author>
<name>Introduction to XML</name>
<address>123 Elm St.</address>
<phone>(123) 456-7890</phone>
</book>
<book>
<author>John Smith</author>
<name>Introduction to XSL</name>
<address>456 Oak Ave.</address>
<phone>(156) 789-0123</phone>
</book>
<book>
<author>Mike</author>
<name>Introduction to XSLT</name>
<address>456 Oak Ave.</address>
<phone>(156) 789-0123</phone>
</book>
</books>
Books need to be grouped by author. In the above example John Smith is the author for two books, so the output xml should look like the following.
<authors>
<author>
<name>John Smith</name>
<book>
<name>Introduction to XML</name>
<name>Introduction to XSL</name>
</book>
</author>
<author>
<name>Mike</name>
<book>
<name>Introduction to XSLT</name>
</book>
</author>
</authors>.
I really appreciate if you can help me with XSL.
|