docbook and xmlproc

T

Tim Arnold

hi, I'm unable to get xmlproc to validate my docbook test file. This is new
territory for me, so I'd appreciate any advice on what I'm doing wrong.
Using python 2.4 on HPux10.20.

The test file (testdb.xml)
<?xml version="1.0"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"/dept/app/doc/xml/DocBook/docbookx.dtd">
<chapter><title>Test Chapter</title>
<para>
This is a test document.
</para>
</chapter>

The python code:
from xml.parsers.xmlproc import xmlproc
from xml.parsers.xmlproc import xmlval
print 'Validate without DTD'
p0 = xmlproc.XMLProcessor()
p0.set_application(xmlproc.Application())
p0.parse_resource('testdb.xml')
print
#
print 'Validate with DTD'
p1 = xmlval.XMLValidator()
p1.set_application(xmlval.Application())
p1.parse_resource('testdb.xml')

Of course it gets through the 'Validate without DTD' portion fine, but I get
this error on the 'Validate with DTD' part:
-----------------------
ERROR: Internal error: External PE references not allowed in declarations at
/dept/app/doc/xml/DocBook/dbcentx.mod:308:10
TEXT: '
]]>

<![ '
-----------------------
The DTD I'm using is the plain-vanilla docboox.dtd version 4.5, downloaded
from the docbook.org site. My guess is that I'm misunderstanding something
in the above code, but for completeness, here's the info on the dbcentx.mod
file: the file has this def at the beginning:

<!ENTITY % ISOamsa.module "INCLUDE">
<![%ISOamsa.module;[
<!ENTITY % ISOamsa PUBLIC
"ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML"
"ent/isoamsa.ent">
<!--end of ISOamsa.module-->]]>

and these lines later on (307-9) :
307 <![ %ISOamsa.module; [
308 %ISOamsa;
309 ]]>

The isoamsa.ent file is in the ent subdir relative to the dbcentx.mod file,
so I'm at a loss.
thanks,
--Tim Arnold
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top