[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: XML catalog documentation
On Thu, Jan 30, 2003 at 04:34:55PM +0100, Jeanson Mauritz wrote: > > -----Original Message----- > > From: Bob Stayton [mailto:bobs@caldera.com] > > Sent: Wednesday, December 04, 2002 5:46 AM > > To: Jeanson Mauritz; docbook-apps@lists.oasis-open.org > > Subject: Re: DOCBOOK-APPS: XML catalog documentation > > > > <SNIPPED> > > > > > Well, I could have sworn I had the Xalan example working, > > but it doesn't. I don't think you are missing anything. > > Xalan doesn't seem to apply the catalog to URIs on the > > command line. Period. I can put the > > CatalogManager.properties verbosity setting up to 4, and I > > never see a message like: > > > > resolve(http://docbook.sourceforge.net/...). > > > > The first resolve attempt is for: > > > > resolve(../VERSION) > > > > which is the first reference in docbook.xsl to another > > file. So it never even tries to look up the argument > > to the -XSL option from the command line. > > > > But if I put the stylesheet reference in the file > > like this: > > > > <?xml version="1.0" encoding="utf-8"?> > > <?xml-stylesheet type="text/xml" > > > > href="http://docbook.sourceforge.net/release/xsl/current/html/ > > docbook.xsl"?> > > > > Then the catalog is consulted and it works to find the > > local file. > > > Adding the stylesheet PI (with type="text/xsl") in the > XML file makes no difference at all for me, I'm sad to say. > > With the PI and using the same command line as before, I still don't > get any "resolveURI(http://docbook.sourceforge.net/...)" messages. > > I have tried Xalan 2.4.0 and 2.4.1. I just tested it again and it does work with Xalan 2.4.1 running on my Linux system under Java 1.3. If you are running Java 1.4 or higher, one thing you have to check is that you are actually getting Xalan 2.4.1 and not the older version bundled with Java 1.4. Setting the classpath is not enough. There is a section titled "Bypassing the old Xalan installed with Java" in http://www.sagehill.net/xml/docbookxsl/ToolsSetup.html Assuming you are actually running 2.4.1, here is the XML catalog, the top of the sample file that worked for me, the command line I used, and the verbosity=4 message: catalog.xml ---------------------------------- <?xml version="1.0"?> <!DOCTYPE catalog PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <group xml:base="/home/bobs/" > <!-- Resolve web URLs to local files --> <rewriteURI uriStartString="http://docbook.sourceforge.net/release/xsl/current/" rewritePrefix="docbook-xsl-1.58.1/" /> </group> </catalog> myfile.xml ------------------------------------------ <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xml" href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "../docbook42/docbookx.dtd"> <book> ... make command -------------------------------------------- xalantest: java \ -cp "../xalan241/bin/xalan.jar:../javalib/resolver.jar:.:../xalan241/bin/xercesImpl.jar" \ org.apache.xalan.xslt.Process \ -out qatest.xalan.html \ -in qatest.xml \ -ENTITYRESOLVER org.apache.xml.resolver.tools.CatalogResolver \ -URIRESOLVER org.apache.xml.resolver.tools.CatalogResolver verbosity=4 output --------------------- Parse catalog: catalog.xml Loading catalog: catalog.xml Default BASE: file://home/bobs/mydocs/catalog.xml xml:base: /home/bobs/ BASE STR: /home/bobs/ rewriteURI: http://docbook.sourceforge.net/release/xsl/current/ docbook-xsl-1.58.1/ REWRITE_URI: http://docbook.sourceforge.net/release/xsl/current/ file:/home/bobs/docbook-xsl-1.58.1/ (reset) xml:base: file://home/bobs/mydocs/catalog.xml BASE STR: file://home/bobs/mydocs/catalog.xml resolveURI(http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl) Resolved URI: http://docbook.sourceforge.net/release/xsl/current/html/docbook.xs l file:/home/bobs/docbook-xsl-1.58.1/html/docbook.xsl ... The last line indicates that it resolved the web URI to the local address. Hope this is enough to get it working for you. -- Bob Stayton 400 Encinal Street Publications Architect Santa Cruz, CA 95060 Technical Publications voice: (831) 427-7796 The SCO Group fax: (831) 429-1887 email: bobs@sco.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC