Get the following siblings with a limit
Posted: Wed Dec 15, 2021 1:19 am
Hi,
I'm want an XSLT that will extract the content following the h1 and before the next h1 or end of the document.
Here is my data.
when I try descendant::h1[1]/following::node() it retrieves everything. this works fine with descendant::h1[3]/following::node(), because there is no following h1 after h1[3]. Please let me know on how can I do it.
I'm want an XSLT that will extract the content following the h1 and before the next h1 or end of the document.
Here is my data.
Code: Select all
<div id="toc">
<h1>Head 1</h1>
<p>para text</p>
<div class="class1">div content</div>
<h1>Head 2</h1>
<p>para text</p>
<span>span content</span>
<h1>Head 3</h1>
<p>para text</p>
</div>