Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAXParseException on fetching records #1

Closed
rvanheest opened this issue Nov 7, 2018 · 2 comments
Closed

SAXParseException on fetching records #1

rvanheest opened this issue Nov 7, 2018 · 2 comments

Comments

@rvanheest
Copy link

When running the validator on our OpenAIRE endpoint in Narcis, we get a org.xml.sax.SAXParseException on the tests for check400_CheckPersons, check500_CheckOrgUnits and check600_CheckProjects. Listed below is an example input, as well as the error message that is outputed by the validator.

However, if we go back to commit 6fcb5ff (which is the one before you introduced strict mode on the validator), the XML parsing is done successfully. Every commit after, up to the current master, will fail on the aforementioned tests with the same exception.

example input:

<?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>2018-11-07T14:26:30Z</responseDate>
   <request metadataPrefix="oai_cerif_openaire" verb="ListRecords">http://oai.narcis.nl/cerif</request>
   <ListRecords>
      <record>
         <header>
            <identifier>oai:narcis.nl:OrgUnits/ORG1236019</identifier>
            <datestamp>2018-10-18T07:49:33Z</datestamp>
            <setSpec>openaire_cris_orgunits</setSpec>
         </header>
         <metadata>
            <OrgUnit xmlns="https://www.openaire.eu/cerif-profile/1.1/" id="ORG1236019">
               <Naam xml:lang="nl">test naam</Naam>
               <Naam xml:lang="en">test name</Naam>
               <ElectronicAddress>tel:+31-123-456789</ElectronicAddress>
               <ElectronicAddress>fax:+31-987-654321</ElectronicAddress>
               <ElectronicAddress>mailto:info@my-test-email-addres.foo</ElectronicAddress>
               <ElectronicAddress>url:http://www.example.com</ElectronicAddress>
            </OrgUnit>
         </metadata>
         <about>
            <provenance xmlns="http://www.openarchives.org/OAI/2.0/provenance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/provenance http://www.openarchives.org/OAI/2.0/provenance.xsd">
               <originDescription harvestDate="2018-10-18T09:49:32Z" altered="true">
                  <baseURL>http://tnarcis01.dans.knaw.nl/nodserver-0.0.1/nodbrug</baseURL>
                  <identifier>ORG1236019</identifier>
                  <datestamp>2003-07-02</datestamp>
                  <metadataNamespace>http://www.onderzoekinformatie.nl/nod/org</metadataNamespace>
               </originDescription>
            </provenance>
         </about>
      </record>
   </ListRecords>
</OAI-PMH>

validator error message:

[org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 76; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'provenance'.]
@jdvorak001
Copy link
Member

jdvorak001 commented Nov 7, 2018

O.k., this looks like we need to compile in another XML Schema: http://www.openarchives.org/OAI/2.0/provenance.xsd .
I would, however, prefer to stay with the strict validation mode.

@jdvorak001
Copy link
Member

jdvorak001 commented Nov 7, 2018

@rvanheest: it should be fixed now, please give it a try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants