Is XSLT a good solution for breaking an XML document into sets by element name? For example, if my document is:
<mydocument>
<items>
<item>one</item>
<item>two</item>
<item>three</item>
<item>four</item>
</items>
</mydocument>
I want to split this into sets of 3 or less like:
<mydocument>
<items page="1">
<item>one</item>
<item>two</item>
<item>three</item>
</items>
<items page="2">
<item>four</item>
</items>
</mydocument>
Can someone provide me with a XSLT approach, or even better, an example.