title: get xml attribute named xlink:href using xsl
body: <p>How can I get the value of an attribute called <code>xlink:href</code> of an xml node in xsl template?</p>
  
  <p>I have this xml node:</p>
  
  <pre><code>&lt;DCPType&gt;
   &lt;HTTP&gt;
    &lt;Get&gt;
     &lt;OnlineResource test="hello" xlink:href="http://localhost/wms/default.aspx" 
        xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" /&gt;
    &lt;/Get&gt;
   &lt;/HTTP&gt;
  &lt;/DCPType&gt;
  </code></pre>
  
  <p>When I try the following xsl, I get an error saying "Prefix 'xlink' is not defined." :</p>
  
  <pre><code>&lt;xsl:value-of select="DCPType/HTTP/Get/OnlineResource/@xlink:href" /&gt;
  </code></pre>
  
  <p>When I try this simple attribute, it works:</p>
  
  <pre><code>&lt;xsl:value-of select="DCPType/HTTP/Get/OnlineResource/@test" /&gt;
  </code></pre>