We need to make multiple XML documents, each with one "info" element, from a single XML document that has an unknown number of "info" elements. For example, this document:
<alert>
<identifier>2.49.0.1.124.76fea972.2015</identifier>
<info>
<language>en</language>
</info>
<info>
<language>fr</language>
</info>
</alert>
should yield these two documents:
<alert>
<identifier>2.49.0.1.124.76fea972.2015</identifier>
<info>
<language>en</language>
</info>
</alert>
<alert>
<identifier>2.49.0.1.124.76fea972.2015</identifier>
<info>
<language>fr</language>
</info>
</alert>
While pruning siblings of an "info" element, we need to copy all nodes, attributes, namespaces, etc of all ancestors (to the root), as well as all nodes, attributes, namespaces, etc of the particular "info" element.
I am a newbie at XSLT and at a loss for how to do this. Any help would be greatly appreciated!