You seem to be using:

* XXE Personal Edition to create and edit your DocBook documents.

* The Render XEP command-line tool to convert your DocBook documents to PDF.

* Our XMLmind XSL-FO Converter (XFC) command-line tool to convert your
DocBook documents to RTF.



Now some answers to your questions:

* Given the fact that you author DocBook v4.5 documents, these documents
must really, really have a <!DOCTYPE>.

Otherwise, simple characters entities such as &nbsp; would not be
defined and would cause any XML tool to report a parse error.

* XEP and XFC are 100% correct when they try to download
http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd. After all this
is what is specified in the <!DOCTYPE> and the DTD is really needed to
be able to parse the document.

* The cure is to instruct XEP and XFC to use an *XML* *catalog*. See
http://xml.apache.org/commons/components/resolver/resolver-article.html

An XML catalog basically says: you'll find a local copy of
http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd in
foo/bar/docbookx.dtd

Excerpts from XXE_install_dir/addon/config/docbook/catalog.xml:
---
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
         prefer="public">

  <group xml:base="dtd/">
    <!-- V4.5 -->

    <public publicId="-//OASIS//DTD DocBook XML V4.5//EN"
            uri="V4.5/docbookx.dtd"/>
    ...
---



For a normal user, it's quite hard to configure the XEP and XFC
command-line tools to use XML catalogs. (Explaining what to do is out of
the scope of this mailing list.) That's why we, XMLmind, offer two handy
alternatives:

--> XMLmind XML Editor Professional Edition has a "Convert Document"
submenu for DocBook 4 & 5, DITA, XHTML, etc. Using this submenu, the
conversion just works.

--> XMLmind XML Editor Personal Edition does not have a "Convert
Document" submenu. However we have developped XMLmind XSL Utility
(Personal Edition is free) which may be used to convert DocBook 4 & 5,
DITA, XHTML to variety of formats quite painlessly.

XMLmind XSL Utility is a graphical tool but may also be used as a
command-line tool. See http://www.xmlmind.com/foconverter/xsl_utility.html

XMLmind XSL Utility integrates XEP, FOP and XFC. Try it, you'll like it.

Download XMLmind XSL Utility from this page:
http://www.xmlmind.com/foconverter/downloadperso.shtml



---
PS: FYI, DocBook 5 documents conform to a RELAG NG schema and not to
DTD. That's why DocBook 5 documents have no <!DOCTYPE>.



On 02/15/2011 05:45 PM, Justin Z wrote:
> 
> I'm exploring using XXE for some writing, but I'm having no success when
> trying to produce RTF or PDF output using XMLmind's XSL-FO converter or
> RenderX's XEP converter on the XML DocBook file generated by XXE.
> 
> XEP succeeds on one of its sample files, but none of the samples contain
> doctype statements, and none of them are DocBook.
> 
> Questions:
> 
> A - Can XXE be used to author DocBook XML and then produce (by itself or
> 3rd-party) readable formats outside of itself? (.doc, .rtf, .pdf, etc).
> If so then how? (I've tinkered, RTFM'ed, Googled, and explored the
> mailing-list archives, but no joy -- I can only print from within XXE to
> produce deliverable copy)
> 
> B - Does XSL-FO require that it be able to access the internet? If yes,
> then does it honor the http_proxy env variable from the shell? Is there
> a command-line switch (none is documented in the Userguide). (I use
> linux and a proxy, so I have HTTP_PROXY set and I can wget from remote
> hosts, etc, but that doesn't seem to help. And rendering of my xml file
> by XXE is fine when I'm off the network.)
> 
> C - Does WYSIWYM DocBook editing in XXE require a Doctype? (e..g., is
> this what's causing the two converters to fail?)
> 
> D - Is there a PDF converter for non-professional users like me? (I'm
> using the personal version, so addons don't work)
> 
> Background:
> 
> I created a simple document with book info, several parts, chapters,
> sections, and appendices. I then tried to do a few things with it,
> including converting it to PDF and RTF, (and making it readable by a
> normal browser by adding stylesheet, etc...). The excerpts below show
> the basic structure.
> 
> 1. First I tried XEP and I get:
> Result: '[error] Fatal parse error: file:/C:/Documents and
> Settings/me/My Documents/foo.xml: line 3, column 57: Cannot read from
> http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd (Connection timed
> out: connect)
>   [error] formatting failed
>   [error] org.xml.sax.SAXParseException: Cannot read from
> http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd (Connection timed
> out: connect)
> Formatting failed.'
> 
> Hmm, seems XEP wants to parse the file/URL in the Doctype. That's a
> shame -- what If I weren't on the internet. Then what? Seems silly.
> 
> 2. Then I try removing that Doctype statement -- after all, there are
> plenty of examples of Docbook XML that do not have a doctype.
> Result: XXE no longer renders in WYSIWYM
> 
> 3. Next I try XSL-FO converter:
> $ ./fo2rtf.bat foo.xml foo.rtf
> Result:  'Cannot convert "foo.xml" to "foo.rtf": Connection timed out:
> connect'
> 
> Timed out trying to connect to what? oasis-open.org <http://oasis-open.org>?
> 
> So, I'm confused as to why each of these two converters seem to fail on
> timing-out, or not being able to read the docbookx.dtd file from Oasis
> (again, I can load the file and copy it locally via Firefox, and wget it
> from the shell that I'm starting the converters with).
> 
> I'd like to get rid of the Doctype statement or at least the remote URL
> in favor of a local file, but it seems to require a large library of
> entities -- this may get messy.
> 
> Any suggestions on getting the converters to work?
> 
> Thanks in advance!
> 
> FOO.XML
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
> "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd";>
> <book>
>   <bookinfo>
>     <title>Test Book - The Zen of Foo</title>
> 
>     <author>
>       <firstname>Me Myself and I</firstname>
> ...
>   <part>
>     <title>What is Foo</title>
> 
>     <chapter>
>       <title>Foo Design</title>
> 
>       <para></para>
> 
>       <section>
>         <title>Components of Foo</title>
> ...
>   <appendix>
>     <title>Restrictions on Foo</title>
> 
>     <para></para>
>   </appendix>
> </book>
> 

 
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to