I have XML similar to below. I want to "recordize", if you will, the xml based on the authors. So for each author child node I want a complete copy of all the xml and just one author child node for each copy. I have gotten close but generate the authors correctly is hanging me up. Any help is appreciated!
SAMPLE:
<root>
<book>
<name>
... some data
</name>
<info>
... some data
</info>
<authors>
<author> Author 1</author>
<author> Author 2</author>
</authors>
other nodes
.
</book>
</root>
=======================
OUTPUT:
<root>
<book>
<name>
... some data
</name>
<info>
... some data
</info>
<authors>
<author>Author 1</author>
</authors>
other nodes
.
</book>
</root>
<root>
<book>
<name>
... some data
</name>
<info>
... some data
</info>
<authors>
<author>Author 2</author>
</authors>
other nodes
.
</book>
</root>
This is not exactly trivial - try:
XSLT 1.0
Note: if you can use a XSLT 2.0 processor, read up on parameter tunneling; that will make this slightly less complicated.