title: XSLT - Deep equal unexpected behaviour
body: <p>Given file A that contains:</p>
  
  <pre><code>&lt;body&gt;
     &lt;ul id="d76e10"&gt;         
        &lt;li id="d76e11"&gt;Zoom In: Enlarges.&lt;/li&gt;
        &lt;li id="d76e13"&gt;Zoom Out: Reduces.&lt;/li&gt;
     &lt;/ul&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>File B that contains:</p>
  
  <pre><code>&lt;body&gt;
     &lt;ul id="d78e10"&gt;
        &lt;li id="d78e11"&gt;&lt;uicontrol id="d78e12"&gt;Zoom In&lt;/uicontrol&gt;: Enlarges.&lt;/li&gt;
        &lt;li id="d78e15"&gt;&lt;uicontrol id="d78e16"&gt;Zoom Out&lt;/uicontrol&gt;: Reduces.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>And finally file C that contains:</p>
  
  <pre><code>&lt;body&gt;
    &lt;ul&gt;
      &lt;li&gt;
        &lt;p&gt;Zoom In: Enlarges a section of the chart to show more detail.&lt;/p&gt;&lt;/li&gt;
      &lt;li&gt;other stuff&lt;/li&gt;      
    &lt;/ul&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>I am trying to find identical <code>&lt;li&gt;</code> tags between File C and A or File C and B.</p>
  
  <p>So basically, I have a do the following, according to a <a href="https://stackoverflow.com/questions/37479600/xslt-replace-content-by-a-reference-when-this-content-is-shared-by-2-files">previous question</a>:</p>
  
  <pre><code>&lt;xsl:template match="li"&gt;
      &lt;xsl:variable name="matched-doc" 
        select="$ref-docs[//li[deep-equal(normalize-space(.), normalize-space(current()))]]" /&gt;
      &lt;!-- ref-docs contains file A and B. --&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>When I run this code, i get a positive hit for files A <strong>and</strong> B.
  Clearly, it seems the normalize-space probably did something, because I have tried without and I get no hit, as expected.</p>
  
  <p>Can anybody help me understand why the normalize-space seems to destroy child nodes?</p>
  
  <p>Also, how can I have the Deep-equal function ignore the <code>ID</code> attribute?</p>