Feature #2787

validate XML files using XSD files located in data/xsd

Added by Peter Van Garderen almost 13 years ago. Updated about 7 years ago.

Status:VerifiedStart date:
Priority:LowDue date:
Assignee:Dan Gillean% Done:

0%

Category:Import/Export
Target version:Release 2.2.0
Google Code Legacy ID:atom-837 Tested version:2.2, pre-1.2
Sponsored:Yes Requires documentation:

Description

When importing a XML file that uses a relative path to the DTD in its
DOCTYPE declaration (best practice for EAD), it looks for the file in the
/web directory. Qubit needs to maintain copies of supported DTDs in a
/data/dtd directory and update the XML Import code to look for it there.

[g] Legacy categories: EAD, Import/Export

qubit_xsd_validation.patch Magnifier (2.45 KB) Peter Van Garderen, 12/01/2012 12:50 AM


Related issues

Related to Access to Memory (AtoM) - Bug #6064: EAD DTD causing errors and warnings on Import into AtoM 2.x Verified 12/02/2013
Related to Access to Memory (AtoM) - Bug #6877: MODS import doesn't work if namespace attributes included Verified 06/21/2014

History

#1 Updated by Peter Van Garderen almost 13 years ago

The attached patch bypasses the validation check (see patch line 49) that MJ created
for the XML import class (this stops the XML import from reporting that it did not
find the DTD).

The patch then also uses the ValidSchema array to match it to the appropriate import
file schema which is stored locally at /data/xsd/* and validate the schema (see patch
line 30).

Unfortunately, there appears to be an issue with XSD validation in libxml < 2.7.3
which has not yet been packaged for Ubuntu (current release is 2.6). See the
following post:
http://us3.php.net/manual/en/domdocument.schemavalidate.php#89893

For now, the temporary workaround will be to check in ead.dtd to /web which works
with existing code (i.e. will validate and report issues when importing EAD XML).
When Debian/Ubuntu upgrades the libxml package we need to revisit this issue by
applying the patch and validating xml import using schemas maintained in /data/xsd

#2 Updated by Peter Van Garderen over 12 years ago

  • Target version changed from Release 1.0.8 to Release 1.1

[g] Labels added: Milestone-Release-1.1
[g] Labels removed: Milestone-Release-1.0.8

#3 Updated by Peter Van Garderen over 12 years ago

see related r3451

#4 Updated by Anonymous almost 12 years ago

  • Priority set to Low

[g] Labels added: Priority-Low

#5 Updated by Evelyn McLellan over 11 years ago

  • Target version set to Release 1.2

Moved to 1.2.

[g] Labels added: Milestone-Release-1.2

#6 Updated by MJ Suhonos about 11 years ago

Also reproduced as a bug when trying to validate XSD at external URI as defined in XML root element namespaces.

[g] New owner: MJ Suhonos

#7 Updated by David Juhasz over 10 years ago

  • Target version set to Release 1.3

Roll over to Release 1.3

[g] Labels added: Milestone-Release-1.3

#8 Updated by Jesús García Crespo almost 10 years ago

[g] New owner: David Juhasz

#9 Updated by David Juhasz almost 10 years ago

Reassign to David's new account.

[g] New owner: David Juhasz

#10 Updated by David Juhasz over 7 years ago

  • Category set to Import/Export
  • Assignee deleted (David Juhasz)
  • Sponsored set to No

#11 Updated by David Juhasz over 7 years ago

  • Tested version pre-1.2 added

#12 Updated by David Juhasz over 7 years ago

  • Tracker changed from Bug to Feature

#13 Updated by David Juhasz over 7 years ago

  • Target version set to Release 2.2.0
  • Sponsored changed from No to Yes

#14 Updated by Dan Gillean about 7 years ago

  • Assignee set to José Raddaoui Marín

Hey didn't we do this? Is this in qa/2.2.x now?

#15 Updated by José Raddaoui Marín about 7 years ago

  • Assignee changed from José Raddaoui Marín to Dan Gillean

Yes! #7292

We have local XSD validation for DC and MODS and local DTD validation for EAD.

#16 Updated by Dan Gillean about 7 years ago

  • Status changed from New to QA/Review

#17 Updated by Dan Gillean about 7 years ago

  • Status changed from QA/Review to Verified
  • Tested version 2.2 added

Ironically, it seems that some of our EAD files will produce warnings when roundtripped and verified against the DTD - but we can handle that later, in a separate issue ticket, when we have time.

XSD files can be found in data/XSD; EAD DTD is in data/DTD.

Also available in: Atom PDF