Search

i have this structure

<description>
<h3>title 1</h3>
<p>lorem ipsum</p>
<ul>
   <li>1</li>
   <li>2</li>
</ul>

<h3>title 2</h3>
<p>lorem ipsum</p>
</description>

i iterate through h3 node and to get all nodes until the next one of the same type (h3) so far

//description/h3[1]/following-sibling::*[not(preceding::h3[2])]

and i get

lorem ipsum

<ul>
   <li>1</li>
   <li>2</li>
</ul>

<h3>title 2</h3>

the following h3 is also included .. i i don't know how to avoid that.

thank you

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details