On 2004-06-04, Jacky <ch********@hotmail.com> wrote:
On Windows 2000, with OpenJade 1.3.1, and the DocBook sgml/XML DTD 4.2 from
sourceforge.
I can use OpenJade 1.3.1 to generate an rtf document from a DocBook sgml
document. But it failed from a DocBook XML document.
onsgmls works for both sgml and XML documents. Hence, I think maybe I set
up wrong SGML_CATALOG_FILES.
Please show me your SGML_CATALOG_FILES, and other environment variables,
and the command to run OpenJade, if you can solve this problem.
You don't provide the actual error messages, so this is a bit of
guesswork, but this is a common problem.
(Open)Jade's default SGML declaration allows and expects certain
formatting rules that are not allowed in XML. You have to apply a
declaration that will cause it to accept only well-formed XML.
Look for a file called 'xml.dcl' in your SGMLHOME. Add it to the
invocation of openjade. I've got a Makefile with an instruction:
jade $(WARN) $(RTF) -o $*.html $(DCL) $*.xml
where $(WARN) contains any warning flags I want turned on or off,
$(RTF) provides RTF-specific arguments (the DSSSL file to use) and
$(DCL) contains the fully-qualified path to xml.dcl
(/usr/share/sgml/xml.dcl, in my case).
So, do something like:
d:> openjade -d dbk2html.dsl -t rtf-95 /usr/share/sgml/xml.dcl doc.xml
making replacements as appropriate, and you should end up with an RTF
file 'doc.rtf'.
Keith