title: getting all child nodes of element
body: <p>I have an xml file on which I am applying transformation to a specific element and then try to get the text() of all the child nodes ignoring same node </p>
  
  <pre><code>&lt;xml&gt;
      &lt;xrefline&gt;
                &lt;query&gt;eligible individual&lt;/query&gt;
                in respect of a qualified dependant at any time means a person who at that time   
                &lt;quote&gt;
                &lt;para&gt; 
                 &lt;n&gt;(a)&lt;/n&gt; 
                &lt;parap&gt;resides with the qualified dependant,&lt;/parap&gt;
               &lt;/para&gt; 
                &lt;/quote&gt;
         &lt;/xrefline&gt;
       &lt;/xml&gt;
  </code></pre>
  
  <p>My xslt template looks like this and I want to extract all the text() and preserve the query element</p>
  
  <pre><code>&lt;xsl:template match="query" &gt;
  &lt;xsl:apply-templates select="../text()|../node()[self::query]|../node()[not(self::query)]/text()" &gt;&lt;/xsl:apply-templates&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>My desire output should be like this </p>
  
  <pre><code>     &lt;xml&gt;
           &lt;xrefline&gt;
                &lt;query&gt;eligible individual&lt;/query&gt;
                in respect of a qualified dependant at any time means a person who at that time (a) resides with the qualified dependant,
           &lt;/xrefline&gt;
       &lt;/xml&gt;
  </code></pre>
  
  <p>I have to work it around the <code>template match="query"</code> and then go back to get the desire result.  With my above xslt I am getting text which is out side the element quote but not the text of sub childs of quote element... any help or hint will be really helpful.</p>