deleyd
asked on
XSLT processing-instruction: grab everything after
I have a XML file which looks like this:
Is this even possible?
<block>
<?foo bar1?>
<section>
A
</section>
<section>
B
</section>
<?foo bar2?>
<section>
C
</section>
<section>
D
</section>
</block>
I want the output to be something like this:
A
B
foobar1 stuff
C
D
foobar2 stuff
My XSLT code looks something like this:
<xsl:template match="block">
<xsl:apply-templates select="* | processing-instruction('foo') "/>
</xsl:template>
<xsl:template match="processing-instruction('foo')">
somehow process everything that follows, up to next "foo" processing-instruction, then output "foobar1 stuff"
</xsl:template>
My problem is how to process everything following the "foo" processing-instruction, up to the next "foo" processing-instruction, and then output "foobar1 stuff".Is this even possible?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.