title: using xquery to extract attribute value from xml which contains namespaces
body: <p>I am trying to extract the attribute value of element  in the following xml file</p>
  
  <pre><code>&lt;catalog xmlns="http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0" xmlns:xlink="http://www.w3.org/1999/xlink" name="TimeSeriesServer THREDDS Catalog"&gt;
      &lt;service base="http://tsds.net/tsds/" serviceType="OpenDAP"/&gt;
      &lt;catalogRef xlink:title="local" xlink:href="test/ncml_catalog.thredds"/&gt;
      &lt;catalogRef xlink:title="remote" xlink:href="http://virbo.org/metamag/viewDataFile.jsp?docname=C6D5623A-ADEC-8397-88A7-DD62A37BA490&amp;amp;filetype=data"/&gt;
  &lt;/catalog&gt;
  </code></pre>
  
  <p>and the xquery is </p>
  
  <pre><code>declare namespace prefix= "http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0";
  declare namespace xlink="http://www.w3.org/1999/xlink";
  
  let $xslt:= "/db/virbo/xq/merge/merge.xsl"
  let $xml := "/db/virbo/xq/merge/F8ADA960-F16B-5F72-6B09-BE1FE64E5BB1.xml"
  
  return 
     &lt;li&gt;{doc($xml)/prefix:catalog/prefix:catalogRef/@tile}&lt;/li&gt;
  </code></pre>
  
  <p>it suppose to give me <code>test/ncml_catalog.thredds</code> and <code>http://virbo.org/metamag/viewDataFile.jsp?docname=C6D5623A-ADEC-8397-88A7-DD62A37BA490&amp;amp;filetype=data</code>
   but the last line seems not working and don't know why. Thanks inadvance</p>