[XML-SIG] Replacing a Java tool-chain with 4Suite?
Wed, 15 Jan 2003 08:15:22 -0700
> I've got a whole mess (word chosen deliberately :) ) of DocBook-XML
> documents (or more properly, document fragments) which comprise the
> PyOpenGL manual. This set of files was originally converted to pdf,
> html-help, latex, and html by a Java toolchain (which is no longer
> functional, for reasons I haven't yet tracked down) including:
> DocBook XSL
> Sun's Entity Resolver
> Oasis' Docbook Catalog
> WebEQ (for converting mathml to png)
> Now, as far as I can see, 4Suite's 4xslt is an XSL processor similar to
> Saxon, with built-in entity resolution. The XSL distro is just data, as
> is the Catalog (and the catalog's just for entity resolution anyway
> AFAICS). So, I would expect that I could just run 4xslt across the xml
> and xsl files and get a transformed file.
> However, I note that the 4Suite docs talk about using a subset of
> DocBook, rather than DocBook itself.
That's something entirely different. We use a Docbook subset for our own
docs. 4Suite does support full docbook and the Norm Walsh stylesheets, as
many reports confirm.
> And the 4suite parser seems to
> choke on the DocBook 4.2 dbcentx.mod file:
> S:\pyopenglbuild\PyOpenGL2>4xslt --trace -v --outfile=doc/test.xml
> doc/manual/manual.xml doc/xsl/merge.xsl
> Source document
> (file:///S|/pyopenglbuild/PyOpenGL2/doc/manual/manual.xml): XML
> parse error in http://www.oasis-open.org/docbook/xml/4.2/dbcentx.mod at
> line 308, column 10: Internal error: External PE references not allowed
> in declarations
Hmm. By using "-v" (I usually don't, for the sake of speed), you're using
xmlproc. xmlproc is checking the DTD for validity and giving that error. In
my experience, xmlproc isn't the fastest parser out there, but it is one of
the most scrupulous when it comes to checking against DTD. Therefore I think
it is just as likely that this is an actual problem with the Sourceforge
Docbook DTD as it is with xmlproc. Since Norm mostly tests with Java parsers,
he wouldn't know of a problem if they didn't report them.
So I may be wrong in my hunch, but I suggest you do this, fo rthe general good:
You should get the same error, which you can post to the Docbook mailing list
to see if it's truly a Docbook bug.
> So, the question is; are (and/or how are) people using DocBook with
I use it all the time, but in non-validating mode. I know others do, but I
don't know whether they use validating or non-validating mode. Docbook is
still one of the few areas where Saxon is faster and uses less memory than
4xslt, a disparity we're working on, but it does work.
> Is it known to work?
Yep. Until you figure out whether the error you see is real or spurious, try
without the -v. You should get the same result, since the domlette parser
does read the external subset (though it doesn't validate against it).
> Is there some specialised version of
> DocBook's DTD for 4Suite?
Not that I know of.
Uche Ogbuji Fourthought, Inc.
http://uche.ogbuji.net http://4Suite.org http://fourthought.com
Python Generators + DOM - http://www.xml.com/pub/a/2003/01/08/py-xml.html
4Suite Repository Features - https://www6.software.ibm.com/reg/devworks/dw-x4su
XML class warfare - http://www.adtmag.com/article.asp?id=6965
MusicBrainz metadata - http://www-106.ibm.com/developerworks/xml/library/x-thi