Output from xmllint: your help needed!

Tom Bullock tbullock at nd.edu
Sat Aug 7 19:11:30 EDT 2010


Developers,

I have been researching how xmllint works and now think I understand 
what it is doing.  I definitely have an error in my patch per the command.

My understanding is that the parser uses the DTD and related elements to 
examine the identified xml file to see if it conforms to the structure 
set forth in the DTD.

The file gnucash-guide.xml has this statement:
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
         "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY chapter1 SYSTEM "ch_oview.xml">
<!ENTITY chapter2 SYSTEM "ch_basics.xml">
<!ENTITY chapter3 SYSTEM "ch_accts.xml">
             .... ]>

When I went online to that URL, I found the docbookx.dtd as indicated.  
But inside it was not what I expected, that is, a structure indicating 
how the DTD expected the content to be presented.  Instead I found code 
like the following two examples:

<!-- Document hierarchy ............ -->

<!ENTITY % dbhier.module "INCLUDE">
<![ %dbhier.module; [
<!ENTITY % dbhier PUBLIC
"-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.1.2//EN"
"dbhierx.mod">
%dbhier;
]]>

<!-- ...................................................................... -->
<!-- Other general entities ............................................... -->

<!ENTITY % dbgenent.module "INCLUDE">
<![ %dbgenent.module; [
<!ENTITY % dbgenent PUBLIC
"-//OASIS//ENTITIES DocBook XML Additional General Entities V4.1.2//EN"
"dbgenent.mod">
%dbgenent;
]]>

These seem to be pointers to the DTD that might be used and they are written
in a symbolic substitution manner (I think, though not sure).

I have read the first 300 pages of the XML Bible (2nd edition) and have a basic
understanding of how the DTD and document, entity, and attributedeclarations
should interrelate.  Undoubtedly, xmllint is following that structure.
It is just that I cannot find the DTD that is being used by xmllint
when it reads the above DOCTYPE statement.

Can anyone point me to where it is located.  I then can find out what
the xmllint statement is saying is wrong.

Thanks much.

Tom Bullock








More information about the gnucash-devel mailing list