OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Catalogs and PDF output


I think you mean how do you get the fop convenience script (fop.bat or
fop.sh) to work with catalogs?  If so, I don't know.  Those scripts use the
Java class "org.apache.fop.apps.Fop", and I don't know if it can be made to
use a catalog resolver.

But you may not need catalogs for processing of the XSL-FO file, just for
the XML file.  If so, then you can use your current technique using Saxon to
generate a .fo file, and then process that with the FOP script to create the
PDF.  With that two-step process, the fop script is not involved in running
the XSLT process.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: <lists@userdox.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Monday, September 12, 2005 11:35 PM
Subject: [docbook-apps] Catalogs and PDF output


>
> Hi,
>
> I'm not sure if I've misunderstood how to use catalogs or have made an
error
> somewhere.  Please look for any errors in what I have done so far.
>
> I can successfully transform my xml documents to html with this command:
>
> java
> -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.Document
BuilderFactory.Impl
> -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFacto
ryImpl
> -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.pa
rsers.XIncludeParserConfiguration
> com.icl.saxon.StyleSheet -x
org.apache.xml.resolver.tools.ResolvingXMLReader -y
> org.apache.xml.resolver.tools.ResolvingXMLReader -r
> org.apache.xml.resolver.tools.CatalogResolver
> d:\doc_workarea\CourseUnit\cu_book.xml
> d:\doc_workarea\CourseUnit\cu_html_custom_layer.xsl
>
> But - How do I get fop and my catalog file working together??  I can't
seem to
> find the answer to that one anywhere.  If possible I would really like to
run
> the same commands under Windows, Solaris, Linux, and Mac OS.
>
> ==================================================================
> I have the following tools installed:
> saxon (?6.5.3?)
> fop 0.20.5
> Xerces 2.7.1
> resolver (?)
> xincluder (?)
> batik (?)
> avalon-framework-cvs-20020806 (from fop distribution)
> jai (?)
> docbook XML 4.3
> docbook XSL 1.68.1
> ==================================================================
> ==================================================================
> I have a directory structure like:
> D:\
> |
> +---doc_workarea
> |   |   CatalogManager.properties
> |   |   gmp-catalog.xml
> |   |
> |   +---CourseUnit
> |   |   |   cu_appendix_troubleshooting.xml
> |   |   |   cu_article_client.xml
> |   |   |   cu_article_introduction.xml
> |   |   |   cu_article_maintenance.xml
> |   |   |   cu_article_service_provision.xml
> |   |   |   cu_article_strategies.xml
> |   |   |   cu_book.xml
> |   |   |   cu_custom_layer.xsl
> |   |   |   cu_fo_custom_layer.xsl
> |   |   |   cu_html_custom_layer.xsl
> |   |   |   cu_html_help_custom_layer.xsl
> |   |   |   cu_javahelp_custom_layer.xsl
> |   |
> |   +---single-source
> |   |   |   entity_conventions.xml
> |   |   |   itr_custom_layer.xsl
> |   |   |   itr_entities.ent
> |   |   |   itr_fo_custom_layer.xsl
> |   |   |   itr_html_custom_layer.xsl
> |   |   |   xinclude.mod
> |   |   |
> |   |   +---docbook-dtd-4.3
> ==================================================================
> ==================================================================
> My CatalogManager.properties files is:
> catalogs=gmp-catalog.xml;single-source/docbook-dtd-4.3/catalog.xml
> relative-catalogs=false
> static-catalog=yes
> catalog-class-name=org.apache.xml.resolver.Resolver
> verbosity=4
> ==================================================================
> ==================================================================
> I have fixed catalog.xml with the htmltblx.mod entry
> My catalog file (gmp-catalog.xml) is:
> <?xml version="1.0" encoding="UTF-8"?>
>
>
> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
>
>   <!-- DTD and stylesheet files installed under
d:\doc_workarea\single-source\
> -->
>   <group prefer="public"
xml:base="file:///d:\doc_workarea\single-source\">
>
>     <public
>       publicId="-//OASIS//DTD DocBook XML V4.3//EN"
>       uri="docbook-dtd-4.3\docbookx.dtd"/>
>
>     <system
>       systemID="http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd";
>       uri="docbook-dtd-4.3\docbookx.dtd"/>
>
>     <system
>       systemID="xinclude.mod"
>       uri="xinclude.mod"/>
>
>
>     <!-- Resolve DTD PUBLIC identifiers -->
>     <nextCatalog catalog="docbook-dtd-4.3\catalog.xml"/>
>
>   </group>
>
> </catalog>
> ==================================================================
> ==================================================================
> My content is of the form:
> ======================================
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
> "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"; [
> <!ENTITY % xinclude SYSTEM "xinclude.mod">
> <!ENTITY % itr_entities SYSTEM "../single-source/itr_entities.ent">
> %xinclude;
> %itr_entities;
> ]>
> <book id="cu_book">
>   <title>Course and Unit System Guide</title>
>   <bookinfo>
>      ...
>   </bookinfo>
>   <preface>
>      ...
>   </preface>
>   <xi:include href="cu_article_introduction.xml"
> xmlns:xi="http://www.w3.org/2001/XInclude"/>
>   <xi:include href="cu_article_maintenance.xml"
> xmlns:xi="http://www.w3.org/2001/XInclude"/>
>   <xi:include href="cu_article_service_provision.xml"
> xmlns:xi="http://www.w3.org/2001/XInclude"/>
>   <xi:include href="cu_article_client.xml"
> xmlns:xi="http://www.w3.org/2001/XInclude"/>
>   <xi:include href="cu_article_strategies.xml"
> xmlns:xi="http://www.w3.org/2001/XInclude"/>
>   <xi:include href="cu_appendix_troubleshooting.xml"
> xmlns:xi="http://www.w3.org/2001/XInclude"/>
>   &gloss;
> </book>
>
> ======================================
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
>   "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"; [
>   <!ENTITY % xinclude SYSTEM "xinclude.mod">
>   <!ENTITY % itr_entities SYSTEM "../single-source/itr_entities.ent">
>   %xinclude;
>   %itr_entities;
>   ]>
> <article id="cu_strategies">
>   <title>Programing Strategies</title>
>      ...
> </article>
>
>
>
> Cheers,
>
> Geoff
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>
>




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]