title: Apply template on preceding-sibling of following sibling of current node
body: <p>Hi I have following Input</p>
  
  <pre><code>&lt;Root&gt;
      &lt;A rename="yes"/&gt;
      &lt;B rename="no"/&gt;
      &lt;C rename="no"/&gt;
      &lt;D rename="yes"/&gt;
      &lt;E rename="no"/&gt;
      &lt;F all="yes"/&gt;
  &lt;/Root&gt;
  </code></pre>
  
  <p>Currently i am at <code>&lt;A&gt;</code> and i want apply template on the element whose <code>@rename="yes"</code>, that is coming before element  <code>&lt;F&gt;</code>.</p>
  
  <p>i am trying to doing something like:</p>
  
  <pre><code>&lt;xsl:apply-templates select=
   "following-sibling::*[@all='yes']/preceding-sibling::node()[@rename='yes'" /&gt;
  </code></pre>
  
  <p>But i am not getting the expected output. Please suggest.</p>