I did a search first, but I did not find an answer to my question.
I am trying to published with libxml some XML documents originally authored using a commercial system (ArborText Epic). Right now I am experimenting on a WINDOWS XP box, but my long term goal is a SUN UNIX environment. As some lead in work, I ran some experiments with xmllint (version 20602), and would like help with understanding the results. My test document is pretty simple:
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="" type="text/xsl" media="print,pdf" alternate="yes"?>
<?xml-stylesheet href="" type="text/xsl" media="screen"?>
<!--ArborText, Inc., 1988-2002, v.4002-->
<!DOCTYPE book PUBLIC "-//Arbortext//DTD DocBook XML V4.0//EN"
"axdocbook.dtd">
<book>
<title>Sample</title>
<chapter>
<title>Sample</title>
<para>With Preview</para>
<graphic fileref="test.eps"/>
<graphic fileref="test2.eps"/>
<para>Without Preview
<graphic fileref="testA.eps"/>
<graphic fileref="test2A.eps"/>
</para>
</chapter>
</book>
<?Pub *0000000605 0?>
If I try to plug in a local copy of V4.2 docbook I get :
D:\merchant1\My Documents\My Test Graphics\Test 1>xmllint --valid --noout --dropdtd --loaddtd file:///c:/xml/docbook/docbookx.dtd test.xml
file:///c:/xml/docbook/docbookx.dtd:62: parser error : StartTag: invalid element name
<!ENTITY % sgml.features "IGNORE">
^
file:///c:/xml/docbook/docbookx.dtd:62: parser error : Extra content at the end of the document
<!ENTITY % sgml.features "IGNORE">
^
test.xml:6: I/O error : failed to load external entity "axdocbook.dtd"
"axdocbook.dtd">
^
test.xml:7: validity error: Validation failed: no DTD found !
<book>
^
I am surprised that there would be parse errors with docbook. Should I have been surprised?
I also ran this using the ArborText docbook :
D:\merchant1\My Documents\My Test Graphics\Test 1>xmllint --valid --noout --dropdtd --loaddtd "c:\program files\epic\doctypes\axdocbook\axdocbook.dtd" test.xml
file:///c%3A/program%20files/epic/doctypes/axdocbook/axdocbook.dtd:1: parser error : Malformed declaration expecting version
<?xml encoding="utf-8"?>
^
file:///c%3A/program%20files/epic/doctypes/axdocbook/axdocbook.dtd:1: parser error : Blank needed here
<?xml encoding="utf-8"?>
^
file:///c%3A/program%20files/epic/doctypes/axdocbook/axdocbook.dtd:17: parser error : StartTag: invalid element name
<!ENTITY % sgml-entity-declarations "IGNORE">
^
file:///c%3A/program%20files/epic/doctypes/axdocbook/axdocbook.dtd:17: parser error : Extra content at the end of the document
<!ENTITY % sgml-entity-declarations "IGNORE">
^
test.xml:6: I/O error : failed to load external entity "axdocbook.dtd"
"axdocbook.dtd">
^
test.xml:7: validity error: Validation failed: no DTD found !
<book>
^
Again I am surprised that there are parse errors with the ArborText docbook. And again, should I have been surprised?
Is there an environment variable that I can set to make xmllint load axdocbook? I think I could make a catalog that points to axdocbook, and then set environment variable XML_CATALOG_FILES to point to this catalog, but is there another or better solution?