Hello,
I am validating the following MODS document against a local copy of
http://www.loc.gov/standards/mods/xml.xsd (using "xmllint --schema
xml.xsd record.xml"):
<?xml version="1.0" encoding="UTF-8"?>
<mods xmlns:mods="http://www.loc.gov/mods/v3">
<mods:titleInfo>
<mods:title>A Jewel of Honesty</mods:title>
</mods:titleInfo>
<mods:genre>Article</mods:genre>
<mods:abstract>clashing oppositions</mods:abstract>
<mods:subject>
<mods:geographic>N/A</mods:geographic>
</mods:subject>
<mods:subject authority="none">
<mods:topic>General interest</mods:topic>
</mods:subject>
<mods:relatedItem type="host">
<mods:titleInfo>
<mods:title>Carnegie Newsletter</mods:title>
<mods:title type="issue">Celebration a Spectacle of
Hope</mods:title>
</mods:titleInfo>
<mods:name>
<mods:namePart>Pra'N'Ava</mods:namePart>
<mods:role>
<mods:roleTerm authority="marcrelator"
type="text">author</mods:roleTerm>
</mods:role>
</mods:name>
<mods:name>
<mods:namePart>N/A</mods:namePart>
<mods:role>
<mods:roleTerm authority="chodarr"
type="text">recipient</mods:roleTerm>
</mods:role>
</mods:name>
<mods:part>
<mods:extent unit="pages">
<mods:list>9,14</mods:list>
<mods:start>9</mods:start>
</mods:extent>
</mods:part>
<mods:originInfo>
<mods:dateIssued encoding="iso8601">19870101</mods:dateIssued>
</mods:originInfo>
</mods:relatedItem>
</mods>
xmllint prints a copy of my record.xml and then claims twice that
"Element mods not declared", and then reports "record.xml fails to
validate". Does anyone know why these errors are being returned? There
must be a problem with the syntax in my opening and closing <mods>
elements but after looking at raw XML all day I can't see what it is.
Also, if I want to batch validate a few thousand similar records, is
using the schema at http://www.loc.gov/standards/mods/xml.xsd still the
preferred way to do it (see
http://osdir.com/ml/text.mods/2007-01/msg00004.html).
TIA,
Mark
Mark Jordan
Head of Library Systems
W.A.C. Bennett Library, Simon Fraser University
Burnaby, British Columbia, V5A 1S6, Canada
Voice: 778.782.6959 / Fax: 778.782.3023
[log in to unmask] / http://www.sfu.ca/~mjordan/
|