I want to wrap all the appendix elements, but only if the first appendix element's preceding sibling is part.
So if the input is like
<part>
..
..
</part>
<appendix href="..">
</appendix>
<appendix href="..">
</appendix>
Then the output is like
<part>
..
..
</part>
<appendices>
<appendix href="..">
</appendix>
<appendix href="..">
</appendix>
</appendices>
I'm fairly new to XSLT. So all that I've tried has failed till now. Any help will be much appreciated.