[sword-devel] xmllint & the OSIS standard

Andrew Thule thulester at gmail.com
Sun Apr 1 15:28:14 MST 2012


I just started working with OSIS.  I create a KJV.osis file using:

%mod2osis KJV > KJV.osis

Then looking at the KJV.osis file I see this as header:

<?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
osisCore.2.5.xsd">

<osisText osisIDWork="KJV" osisRefWork="defaultReferenceScheme" xml:lang="en">

-=-=-=- Remainder Deleted -=-=-=-

The schemaLocation produced by mod2osis uses "osisCore.2.5.xsd".
Examples in the manual at the website (
http://www.bibletechnologies.net/ ) says the most recent version is
"osisCore.2.1.1.xsd".  Ok, no big deal, documentation is often the
last thing that gets updated.  So then I try the following command:

%xmllint --valid --noout KJV.osis

All I get is:

KJV.osis:3: validity error : Validation failed: no DTD found !
Location="http://www.bibletechnologies.net/2003/OSIS/namespace osisCore.2.5.xsd"

Then I try the following:
%xmllint --noout --dtdvalid
http://www.bibletechnologies.net/2003/OSIS/namespace/osisCore.2.5.xsd
KJV.osis
%xmllint --noout --dtdvalid
http://www.bibletechnologies.net/2003/OSIS/osisCore.2.5.xsd KJV.osis
%xmllint --noout --dtdvalid
http://www.bibletechnologies.net/2003//osisCore.2.5.xsd KJV.osis
%xmllint --noout --dtdvalid
http://www.bibletechnologies.net/osisCore.2.5.xsd KJV.osis
and:
%xmllint --noout --dtdvalid
http://www.bibletechnologies.net/2003/OSIS/namespace --schema
osisCore.2.5.xsd KJV.osis

All produce the same error, to the effect:
http://www.bibletechnologies.net/2003/OSIS/namespace/osisCore.2.5.xsd:2:
parser error : Content error in the external subset
<html><head>
^
Could not parse DTD
http://www.bibletechnologies.net/2003/OSIS/namespace/osisCore.2.5.xsd

Then I switch to looking at the osisCore.2.1.1.xsd file suggested at
( http://www.bibletechnologies.net/ ) site.  I create a test file
using the suggested headers mentioned in the documents at the same
site (as follows):

-=-=-=- 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:noNamespaceSchemaLocation="osisCore.2.1.1"
  xsi:schemaLocation="http://www.bibletechnologies.net/2003/OSIS/namespace
                      http://www.bibletechnologies.net/osisCore.2.1.1.xsd">

<osisText osisIDWork="TEST" osisRefWork="defaultReferenceScheme" xml:lang="en">

        <header>
                <work osisWork="TEST">
                        <title>TEST</title>
                        <identifier type="OSIS">Bible.TEST</identifier>
                        <refSystem>Bible.KJV</refSystem>
                </work>
                <work osisWork="defaultReferenceScheme">
                        <refSystem>Bible.KJV</refSystem>
                </work>
        </header>

        <div type="x-testament"></div>
        <div type="x-testament"></div>
        </osisText>
</osis>

-=-=-=- End of File -=-=-=-

Expecting errors because the above file is missing stuff, I still
can't get xmllint to work with this, continue getting "no DTD found"
errors.

So here are some questions:
1. Given mod2osis generates .osis files pointing to osisCore.2.5.xsd
and the site ( http://www.bibletechnologies.net/ ) suggests
osisCore.2.1.1.xsd can someone tell me which version is the correct
version to use?
2. What is the most recent version (perhaps development-wise)?
3. Where can I get my hands on a valid .xsd file?
4. Can someone give me an example of an xmllint command (linux) that
works remotely?

Thanks.

~Andrew



More information about the sword-devel mailing list