[sword-devel] Osis validation problems on header
Chris Little
chrislit at crosswire.org
Mon Nov 2 22:51:08 MST 2009
Here is the valid version of your header. Comments follow.
<?xml version="1.0" encoding="UTF-8"?>
<osis xmlns="http://www.bibletechnologies.net/2003/OSIS/namespace"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bibletechnologies.net/2003/OSIS/namespace
http://www.bibletechnologies.net/osisCore.2.1.1.xsd">
<osisText osisRefWork="Bible" xml:lang="en" osisIDWork="ABN">
<header>
<revisionDesc resp="JGD"><date>2009.11.02</date><p>JGD:
First osis
revision</p></revisionDesc>
<work osisWork="ABN">
<title>An Bíobla Naofa</title>
<contributor role="trl">Various</contributor>
<creator role="edt">Pádraig Ó Fiannachta</creator>
<subject type="DDC">220.5</subject>
<date event="original" type="Gregorian">1981</date>
<date event="eversion" type="Gregorian">2009</date>
<description>Bible text of the Bible in Irish "An Bíobla
Naofa"</description>
<publisher>An Sagart</publisher>
<type type="OSIS">Bible</type>
<format type="x-MIME">text/xml</format>
<identifier type="OSIS">ABN</identifier>
<identifier type="ISBN">1870684907</identifier>
<source>Electronic text (OCR of original 1981 print
edition)
of "An Bíobla Naofa" on CD-ROM (1998) by Chora
Dhuibhne T/as Fios Feasa.
Used by permission from Pádraig Ó Fiannachta</source>
<language type="ISO-639-2">gla</language>
<relation type="x-relatedresource">None</relation>
<coverage>Irish</coverage>
<rights type="x-copyright">Copyright 1981 An
Sagart</rights>
<scope>Gen-Rev</scope>
<refSystem>Bible.KJVA</refSystem>
</work>
<work osisWork="Bible">
<refSystem>Bible.KJVA</refSystem>
</work>
</header>
</osisText>
</osis>
First, and most importantly, the elements of the header must occur in
exactly the order given by the schema (but may occur 0 or more times,
excluding the teiHeader):
<title> titleCT </title> [0..*]
<contributor> contributorCT </contributor> [0..*]
<creator> creatorCT </creator> [0..*]
<subject> subjectCT </subject> [0..*]
<date> dateCT </date> [0..*]
<description> descriptionCT </description> [0..*]
<publisher> publisherCT </publisher> [0..*]
<type> typeCT </type> [0..*]
<format> formatCT </format> [0..*]
<identifier> identifierCT </identifier> [0..*]
<source> sourceCT </source> [0..*]
<language> languageCT </language> [0..*]
<relation> relationCT </relation> [0..*]
<coverage> coverageCT </coverage> [0..*]
<rights> rightsCT </rights> [0..*]
<scope> scopeCT </scope> [0..*]
<castList> castListCT </castList> [0..*]
<teiHeader> teiHeaderCT </teiHeader> [0..1]
<refSystem> refSystemCT </refSystem> [0..*]
That was most of your problems. The other problems were the curly quotes
instead of straight, as you noticed, the incorrectly cased date types
("Gregorian" must be capitalized), and the second subject element, which
I assume was just a mistake.
The above also includes a pair of corrections that wouldn't be cause my
a validator: The ISO 639 code should probably be lowercase. I don't
think ISO actually specifies this, but most other standards (e.g. BCP
47) recommend lowercasing language codes. And the scope statement should
be an osisRef, thus Gen-Rev rather than GEN-REV.
--Chris
johnduffy at cgcf.net wrote:
> Hi,
>
> I've got the whole of the Bible to validate, but have problems with the
> header.
>
> The basic header which is output from usfm2osis.pl allows the whole Bible to
> validate (using Notepad++ and a copy of the Osis schema saved as a local
> file).
>
> <?xml version="1.0" encoding="UTF-8"?>
> <osis xmlns="http://www.bibletechnologies.net/2003/OSIS/namespace"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.bibletechnologies.net/2003/OSIS/namespace
> http://www.bibletechnologies.net/osisCore.2.1.1.xsd">
> <osisText osisRefWork="Bible" xml:lang="en" osisIDWork="GEN">
> <header>
> <work osisWork="GEN"/>
> </header>
>
> However, when I add the Dublin core info, it doesn't validate. I've tried
> to isolate the problem, but have been unsuccessful, as even single line
> additions to the basic header above cause problems. It generally comes up
> with "xml parsing error at line xx; Extra content at the end of the
> document"
>
> Can anyone comment on why the error arises? Also, whether the info looks
> correct below, as there are different options depending on what I read?
> Thanks
>
> <?xml version="1.0" encoding="UTF-8"?>
> <osis xmlns="http://www.bibletechnologies.net/2003/OSIS/namespace"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.bibletechnologies.net/2003/OSIS/namespace
> http://www.bibletechnologies.net/osisCore.2.1.1.xsd">
> <osisText osisRefWork="Bible" xml:lang="en" osisIDWork="ABN">
> <header>
> <revisionDesc resp=”JGD”><date>2009.11.02</date><p>JGD: First osis
> revision</p></revisionDesc>
> <work osisWork="ABN">
> <title>An Bíobla Naofa</title>
> <creator role="edt">Pádraig Ó Fiannachta</creator>
> <contributor role="trl">Various</contributor>
> <identifier type="OSIS">ABN</identifier>
> <identifier type="ISBN">1870684907</identifier>
> <date event="original" type="gregorian">1981</date>
> <date event="eversion" type="gregorian">2009</date>
> <language type="ISO-639-2">GLA</language>
> <rights type="x-copyright">Copyright 1981 An Sagart</rights>
> <publisher>An Sagart</publisher>
> <description>Bible text of the Bible in Irish "An Bíobla
> Naofa"</description>
> <coverage>Irish</coverage>
> <relation type="x-relatedresource">None</relation>
> <format type="x-MIME">text/xml</format>
> <source>Electronic text (OCR of original 1981 print edition)
> of "An Bíobla Naofa" on CD-ROM (1998) by Chora Dhuibhne T/as Fios Feasa.
> Used by permission from Pádraig Ó Fiannachta</source>
> <subject type="DDC">220.5</subject>
> <subject="OSIS">Bible</subject>
> <type type="OSIS">Bible</type>
> <refSystem>Bible.KJVA</refSystem>
> <scope>GEN-REV</scope>
> </work>
> <work osisWork="Bible">
> <refSystem>Bible.KJVA</refSystem>
> </work>
> </header>
>
>
> John Duffy
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
More information about the sword-devel
mailing list