xpath and default namespace
Posted: Mon Jan 23, 2006 12:48 pm
Hi,
How can i tell the xpath engine to use the deafult namespace?
When i have the following xml
and i want to find the element setSpec (//setSpec) there are no results.
when i remove the default namespace (xmlns="http://www.openarchives.org/OAI/2.0/") then i do have results.
How can i tell oxygen to use the default namespace?
Thanks, Hans
How can i tell the xpath engine to use the deafult namespace?
When i have the following xml
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
<responseDate>2006-01-23T08:55:15Z</responseDate>
<request verb="ListRecords" metadataPrefix="oai_dc" set="keur" from="2004-06-01"
until="2004-06-30">http://erad.avu.nl/cgi/arno/oai/bupavu</request>
<ListRecords>
<record>
<header>
<identifier>oai:bupavu:120647</identifier>
<datestamp>2004-06-30</datestamp>
<setSpec>keur:yes</setSpec>
<setSpec>keur</setSpec>
</header>
</record>
</ListRecords>
</OAI-PMH>
when i remove the default namespace (xmlns="http://www.openarchives.org/OAI/2.0/") then i do have results.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<OAI-PMH xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
<responseDate>2006-01-23T08:55:15Z</responseDate>
<request verb="ListRecords" metadataPrefix="oai_dc" set="keur" from="2004-06-01"
until="2004-06-30">http://erad.avu.nl/cgi/arno/oai/bupavu</request>
<ListRecords>
<record>
<header>
<identifier>oai:bupavu:120647</identifier>
<datestamp>2004-06-30</datestamp>
<setSpec>keur:yes</setSpec>
<setSpec>keur</setSpec>
</header>
</record>
</ListRecords>
</OAI-PMH>
How can i tell oxygen to use the default namespace?
Thanks, Hans