<p>I'm having trouble selecting elements that are part of an specific namespace.  My xpath expression works in XMLSpy but fails when using the Xalan libraries..</p>

<pre><code>&lt;item&gt;
   &lt;media:content attrb="xyz"&gt;
     &lt;dcterms:valid&gt;VALUE&lt;/dcterms:valid&gt;
  &lt;/media:content&gt;
&lt;/item&gt;
</code></pre>

<p>My expression is <code>./item/media:content/dcterms:valid</code>.  I've already added both namespace definitions to my XSLT.  Again, this selects the right values in XMLSpy but fails when running through Xalan library.</p>

<p>Any ideas?</p>

Have you tried to define the namespace of the XML blob?
```
```
<item xmlns:dcterms="http://dcterms.example" xmlns:media="http://media.example">
   <media:content attrb="xyz">
     <dcterms:valid>VALUE</dcterms:valid>
  </media:content>
</item>
```
```
i.e.
xmlns:dcterms="http://dcterms.example"
xmlns:media="http://media.example"