zimeon / www.openarchives.org

Content for the http://www.openarchives.org/ website
3 stars 0 forks source link

Make OAI-PMH validator namespace aware #1

Open zimeon opened 10 years ago

zimeon commented 10 years ago

Issue reported by Markus Demleitner is that the validator at http://www.openarchives.org/Register/ValidateSite fails to validate baseURL=http://dc.zah.uni-heidelberg.de/oai.xml with the error:

Identify response does not have OAI-PMH as root element! Found node named 'oai:OAI-PMH' instead.

where the Identify response looks correct but just uses an XML prefix for the OAI-PMH namespace:

<?xml-stylesheet href='/static/xsl/oai.xsl' type='text/xsl'?><oai:OAI-PMH xmlns:oai="http://www.openarchives.org/OAI/2.0/" xmlns:ri="http://www.ivoa.net/xml/RegistryInterface/v1.0" xmlns:vg="http://www.ivoa.net/xml/VORegistry/v1.0" xmlns:vr="http://www.ivoa.net/xml/VOResource/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://vo.ari.uni-heidelberg.de/docs/schemata/OAI-PMH.xsd http://www.ivoa.net/xml/RegistryInterface/v1.0 http://vo.ari.uni-heidelberg.de/docs/schemata/RegistryInterface-v1.0.xsd http://www.ivoa.net/xml/VORegistry/v1.0 http://vo.ari.uni-heidelberg.de/docs/schemata/VORegistry-v1.0.xsd http://www.ivoa.net/xml/VOResource/v1.0 http://vo.ari.uni-heidelberg.de/docs/schemata/VOResource-v1.0.xsd"><oai:responseDate>2014-07-09T04:42:42Z</oai:responseDate><oai:request verb="Identify"/><oai:Identify><oai:repositoryName>GAVO Data Center Registry</oai:repositoryName><oai:baseURL>http://dc.zah.uni-heidelberg.de/oai.xml</oai:baseURL><oai:protocolVersion>2.0</oai:protocolVersion><oai:adminEmail>gavo@ari.uni-heidelberg.de</oai:adminEmail><oai:earliestDatestamp>1970-01-01T00:00:00Z</oai:earliestDatestamp><oai:deletedRecord>transient</oai:deletedRecord><oai:granularity>YYYY-MM-DDThh:mm:ssZ</oai:granularity><oai:description><ri:Resource created="2008-05-07T11:33:00" status="active" updated="2014-07-08T11:25:49" xsi:type="vg:Registry"><title>GAVO Data Center Registry</title><shortName>GAVO DC Reg</shortName><identifier>ivo://org.gavo.dc/__system__/services/registry</identifier><curation><publisher>The staff at the GAVO Data Center</publisher><creator><name>GAVO Data Center</name><logo>http://vo.ari.uni-heidelberg.de/docs/GavoTiny.png</logo></creator><date role="updated">2014-07-08T11:25:49</date><contact><name>GAVO Data Center Team</name><address>Mönchhofstrasse 12-14, D-69120 Heidelberg</address><email>gavo@ari.uni-heidelberg.de</email><telephone>++49 6221 54 1837</telephone></contact></curation><content><subject>Registry</subject><description> The publishing registry for the GAVO Data Center.</description><referenceURL>http://dc.zah.uni-heidelberg.de/__system__/services/registry/info</referenceURL></content><capability standardID="ivo://ivoa.net/std/Registry" xsi:type="vg:Harvest"><description>The harvesting interface for the publishing registry of the GAVO Data
Center</description><interface role="std" version="1.0" xsi:type="vg:OAIHTTP"><accessURL>http://dc.zah.uni-heidelberg.de/oai.xml</accessURL></interface><maxRecords>10000</maxRecords></capability><full>false</full><managedAuthority>org.gavo.dc</managedAuthority></ri:Resource></oai:description></oai:Identify></oai:OAI-PMH>
zimeon commented 7 years ago

According to Section 3.2, bullet 2 or the spec the root element must be OAI-PMH and the default namespace must be defined as http://www.openarchives.org/OAI/2.0/. Thus while it would be useful for that validator to helpfully point out an error if a namespace prefix is used, it shouldn't be accepted.