title: What is the difference between name() and local-name()?
body: <p>I don't really understand the difference between the XPath functions <a href="http://www.w3.org/TR/xpath/#function-name" rel="noreferrer"><code>name</code></a> and <a href="http://www.w3.org/TR/xpath/#function-local-name" rel="noreferrer"><code>local-name</code></a>.</p>
  
  <p>Could you give an example of a situation where they would differ?</p>
  
  <h2>Edit</h2>
  
  <p>Given this example:</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
    &lt;head&gt;&lt;/head&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I get the same result with these two queries: <code>//*[local-name()="head"]</code> and <code>//*[name()="head"]</code>. Why is that?</p>