Just a few remarks on this solution:
On Thu, Sep 25, 2014 at 10:41 PM, Dimitre Novatchev
<dnovatchev(_at_)gmail(_dot_)com> wrote:
On Thu, Sep 25, 2014 at 9:51 PM, Joga Singh Rawat
jrawat(_at_)aptaracorp(_dot_)com
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:
<?xml-start?>anything including tags<?xml-end?>
Something like this:
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:template match="/">
<xsl:for-each-group select=
"(following::processing-instruction()
| descendant::processing-instruction()
)[name()='pi-start']"
group-starting-with="processing-instruction()[name()='pi-start']">
1. The above can be simplified because a document node's following::
axis is the empty nodeset:
<xsl:for-each-group select=
"descendant::processing-instruction()
[name()='pi-start']"
group-starting-with="processing-instruction()[name()='pi-start']">
2. We take the assumptions that the pairs of "start", "end" PIs are
non-overlapping.
Cheers,
Dimitre
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--