[DDI-users] Unable to validate XML against the DDI 2.5 schema

Sebastian Karcher skarcher at maxwell.syr.edu
Wed Sep 4 09:47:39 EDT 2019


Hi Domingo,

The schema as written assumes that the imported schemas (lines 19-21) are present locally. You can either write absolute URLs in there like so:
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="https://www.w3.org/2001/xml.xsd"/>
   <xs:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="https://ddialliance.org/Specification/DDI-Codebook/2.5/XMLSchema/ddi-xhtml11.xsd"/>
   <xs:import namespace="http://purl.org/dc/terms/" schemaLocation="https://www.dublincore.org/schemas/xmls/qdc/dcterms.xsd"/>
Or download and add the three referenced files to your local schema location which will of course be much faster if you do this a lot (I’ve never validated XML using Notepad++ but in emacs/nxml you’d just have the schema in a folder and would add the other schemas to the same folder.)

The ICPSR sample DDI then validates successfully.

Hope that helps,
Sebastian

From: ddi-users-bounces at icpsr.umich.edu <ddi-users-bounces at icpsr.umich.edu> On Behalf Of UniData - Bicocca Data Archive
Sent: Wednesday, September 4, 2019 7:00 AM
To: ddi-users at icpsr.umich.edu
Subject: [DDI-users] Unable to validate XML against the DDI 2.5 schema

Dear DDI users,

since we started working again after the summer break (this week) we can no longer validate the DDI 2.5 XML files produced through our archival system. We thought it was a problem with our DDI files, but the same error occurs  trying to validate the example file on the DDI Alliance website (https://www.icpsr.umich.edu/icpsrweb/ICPSR/ddi25/studies/4245). The error is as follows:

schema_reference.4: Failed to read schema document 'http://www.ddialliance.org/Specification/DDI-Codebook/2.5/XMLSchema/codebook.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

Notepad++ and xmlvalidation.com were used for validation.

Do any of you have the same problem?

Best regards,
Domingo Scisci

--
Domingo Scisci (PhD)

Centro Interdipartimentale UniData
Università degli Studi di Milano-Bicocca
Via Bicocca degli Arcimboldi 8
20126 - Milano
Phone: (+39) 02 6448 7513
Web: www.unidata.unimib.it<http://www.unidata.unimib.it/>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.icpsr.umich.edu/pipermail/ddi-users/attachments/20190904/d69ef000/attachment.html 


More information about the DDI-users mailing list