On Wed, Jul 11, 2001 at 09:18:08AM +1000, Brian May wrote: > >>>>> "Joost" == Joost Kooij <[EMAIL PROTECTED]> writes: > > Joost> You are using openjade, perhaps? Try jade, it does work. > Joost> I got it to work once with the plex86 docs, which are xml > Joost> docbook. > > I am using stuff like: > > ii jade 1.2.1-18 James Clark's DSSSL Engine > ii sgml-data 1.5.2 common SGML DTDs and entities > ii docbook-styles 1.64-1 Modular DocBook stylesheets, for print and H > ii xalan 1.0-3 XSLT processor. > ii docbook-xsl-st 1.40-1 Stylesheets for processing DocBook XML files
Where is docbook-xml? $ dpkg -p docbook-xml Package: docbook-xml Priority: optional Section: text Installed-Size: 952 Maintainer: Adam Di Carlo <[EMAIL PROTECTED]> Architecture: all Version: 4.1.2-7 Provides: docbk-xml Depends: sgml-base (>= 1.07), sgml-data (>= 1.5.0) Recommends: docbook Suggests: docbook-doc, docbook-stylesheets, docbook-xsl-stylesheets Filename: pool/main/d/docbook-xml/docbook-xml_4.1.2-7_all.deb Size: 158014 MD5sum: 13178ded4fbdd6e4b4cbd879b4c143e1 Description: XML DTD for DocBook, also known as DocBk XML An XML representation of the DocBook DTD, which is sometimes referred to as DocBk XML. This is a DTD widely used for documenting software and other technical topics. . This package ships with the newest DocBook XML DTD, as well as a select set of legacy DTDs for use with older documents. After exposing my head to prolonged hammering on the wall, I came up with the following works-for-me incantation to cast xml spells: jade -o ../../output/html/PUG -t sgml \ -d stylesheet/dsssl/docbook/nwalsh/html/docbook.dsl \ /usr/share/sgml/declaration/xml.dcl book_PIG.xml The xml.dcl file is used as a preamble to the actual xml document. It would be helpful if jade had a "-t xml" option that would map to "-t sgml" internally and add the xml.dcl declaration implicitly. That is just my uninformed opinion, anyway. > My file has the following DOCTYPE (from some example, maybe this was wrong?) > > <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" > "docbook/dtd/xml/4.1.2/docbookx.dtd"> > > > jade says: > > [857] [scrooge:bam] ~/source/job/guard/doc >jade -t xml -d > /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/docbook.dsl guard.xml > jade:/usr/share/sgml/docbook/dtd/xml/4.1/docbookx.dtd:74:17:E: "X20AC" is not > a function name > jade:/usr/share/sgml/entities/xml-iso-entities-8879.1986/ISOamsa.ent:6:19:E: > "X21B6" is not a function name > jade:/usr/share/sgml/entities/xml-iso-entities-8879.1986/ISOamsa.ent:7:19:E: > "X21B7" is not a function name > > [...] Yeah, tons of that. Really Useful. > jade:/usr/share/sgml/entities/xml-iso-entities-8879.1986/ISOamsr.ent:20:18:E: > "X22A3" is not a function name > jade:/usr/share/sgml/entities/xml-iso-entities-8879.1986/ISOamsr.ent:21:17:E: > "X2256" is not a function name > jade:I: maximum number of errors (200) reached; change with -E option > > > so I comment out the DOCTYPE declaration, and now get these errors > instead: > > [859] [scrooge:bam] ~/source/job/guard/doc >jade -t xml -d > /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/docbook.dsl guard.xml > jade:guard.xml:4:0:E: no document type declaration; will parse without > validation > jade:guard.xml:279:8:E: general entity "gt" not defined and no default entity > jade:guard.xml:1726:38:E: general entity "lt" not defined and no default > entity Informative to the stooped newbie sgml user, eh? I share the pain. > isn't > how you specify '>'? and isn't < how you specify '<' in > XML? I can never seem to find these documented when I need them. Is > '&' specified &??? > > Jade also gets confused and prints <arg choice="req">stuff</arg> > exactly the same way as <arg choice="opt">stuff</arg>. > > However, this produces the best results so far. > > > > I tried with xalan, too, but it couldn't even find the DTD. (note: I > have deliberately refrained from specifying the XSL file). This might be because you aren't including the preamble before the xml input file. This gives it a proper sgml declaration, I think. > [867] [scrooge:bam] ~/source/job/guard/doc >xalan -in guard.xml > ========= Parsing guard.xml ========== > > Fatal Error at (file guard.xml, line 5, char53): An exception occured! > Type:RuntimeException, Message:Could not open DTD file > 'docbook/dtd/xml/4.1.2/docbookx.dtd' > XSL Error: Could not parse guard.xml document! > XSL Warning: Unknown Exception > > XSLException Type is : XSLTProcessorException > Message is : Could not parse guard.xml document! > > > So I specified the full pathname to the DTD in the XML file, but then > it couldn't find files that are indirectly loaded via that DTD. > > [867] [scrooge:bam] ~/source/job/guard/doc >xalan -in guard.xml > ========= Parsing guard.xml ========== > > Fatal Error at (file /usr/share/sgml/docbook/dtd/xml/4.1.2/dbcentx.mod, line > 56, char10): An exception occured! Type:RuntimeException, Message:Could not > open external entity > '/usr/share/sgml/docbook/dtd/xml/4.1.2/entities/xml-iso-entities-8879.1986/ISOamsa.ent' > XSL Error: Could not parse guard.xml document! > XSL Warning: Unknown Exception > > XSLException Type is : XSLTProcessorException > Message is : Could not parse guard.xml document! > > > > So I remove the DOCTYPE and replace & with & (surprisingly jade > didn't complain about this real error), and now I get: > > [876] [scrooge:bam] ~/source/job/guard/doc >xalan -in guard.xml -xsl > /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl > ========= Parsing > /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl ========== > xalan: XSLT/NamespacesHandler.cpp:125: > NamespacesHandler::NamespacesHandler(const NamespacesHandler &, const > vector<vector<NameSpace,allocator<NameSpace> > >,allocator<vector<NameSpace,allocator<NameSpace> > > > &, const > XalanDOMString &): Assertion `length(theURI) > 0' failed. > zsh: abort xalan -in guard.xml -xsl > > nasty... I haven't yet filed a bug report on this, it is possible my > versions of everything are approx 1 week old. One of the bug reports for some sgml package mentioned adding a symlink here and there in sgml system directories, to work around some naming issues. This may have helped. I don't know for sure, because I turned away in horror after finally having succeeded in transforming the xml documents I was using. > I have filed bug reports on *some* of these issues, but haven't got > any response yet. I am not an expert in these matters, but from my vantage point, the whole sgml/xml suite appears to be in a rut, unfortunately. It badly needs some form of revival operation. Any volunteers? Even documenting what package combinations are needed for specific aims would be an improvement. Cheers, Joost