Return-Path: Delivered-To: apmail-forrest-dev-archive@www.apache.org Received: (qmail 84278 invoked from network); 28 Oct 2004 08:30:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 28 Oct 2004 08:30:34 -0000 Received: (qmail 76545 invoked by uid 500); 28 Oct 2004 08:30:32 -0000 Delivered-To: apmail-forrest-dev-archive@forrest.apache.org Received: (qmail 76463 invoked by uid 500); 28 Oct 2004 08:30:31 -0000 Mailing-List: contact dev-help@forrest.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@forrest.apache.org Delivered-To: mailing list dev@forrest.apache.org Received: (qmail 76447 invoked by uid 99); 28 Oct 2004 08:30:31 -0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_WHOIS,FORGED_RCVD_HELO,SPF_HELO_PASS X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from [196.25.240.77] (HELO ctb-mesg5.saix.net) (196.25.240.77) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 28 Oct 2004 01:30:28 -0700 Received: from sean.site (ndn-40-183.telkomadsl.co.za [165.165.40.183]) by ctb-mesg5.saix.net (Postfix) with ESMTP id 5A62C3DD8 for ; Thu, 28 Oct 2004 10:30:21 +0200 (SAST) From: Sean Wheller Reply-To: sean@inwords.co.za Organization: In Words To: dev@forrest.apache.org Subject: Re: Catalog for Docbook Plugin Date: Thu, 28 Oct 2004 10:27:04 +0200 User-Agent: KMail/1.6.2 References: <200410260917.15849.sean@inwords.co.za> <200410280905.52292.sean@inwords.co.za> <1098949443.22785.27914.camel@ighp> In-Reply-To: <1098949443.22785.27914.camel@ighp> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <200410281027.04468.sean@inwords.co.za> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Thursday 28 October 2004 09:44, David Crossley wrote: > > To answer the question about rewriteSystem and rewriteURI. > > Instead of having a large number of catalog entries I have used > > rewriteSystem and rewriteURI to map the first part of the the reference > > to a different prefix. This way I can map many files located in the same > > place with a single catalog entry. It makes life easier, especially with > > the XSL's. People can call different XSL's to do different things in > > Docbook =C2=A0e.g docbook.xsl for normal transform, profile.xsl for > > transformations that are profiled. chunk.xsl to get write a long docume= nt > > to many files. > > Yes that is good. Sorry to make you explain that. I should > be more careful with words. I mean the difference between > "rewriteSystem" and "rewriteURI", not between those and > Public Identifiers. No my fault, I should have read it again. > > > I call the nextCatalog only to solve the PUBLIC ID's. Instead of writing > > them into my own file as we have with catalog.xcat I just call them and > > use the catalog of the package. This way, as an example, I just need to > > add one more nextCatalog when Docbook 4.4 becomes official. > > Damn, crossed-wires again. Looking back at the example > catalog that you showed, i wondered why you were using > rewriteSystem for the DocBook DTDs and then *also* > doing the nextCatalog. It would only need the latter. To resolve DTD URL "system" ID to local=20 Normally, /\ | THIS PART Resolver can prefer "public" or "system," my catalog has @prefer I want an easy way to rewriteSystem prefix "http://www.docbook.org/xml/4.3/" So it will be "file:///path/to/forrest/plugins/docbook/resources/$rewritePrefix/docbookx.= dtd" Ross has taken charge of doing FOR- This is to replace=20 "file:///path/to/forrest" with "file:///`pwd`/plugins/docbook/resources/ during the build The catalog.xml provided by most packages does not map the systemId it maps= =20 only the publicId. It will try SYSTEM and fallback to public. If system is = a=20 URL it will go look there. So I rewrite the prefix to be local. To resolve a "URI" reference, say to the stylesheets. This is when there is= no=20 DocTypeDecl with publicId or systemId to resolve from. =46or example a stylesheet may call another. Using the same URI as that kno= wn in=20 the public domain is a good idea, but not practical since it means network= =20 operations that slow things down. Using a "hardcoded path" may result in th= e=20 system breaking when paths change, like between when you move to a new=20 computer. With this, everyone can use the public knowledge URI and map to a= =20 local resource by defining it is ONE place. The actual URI does not need to= =20 exist, as is the case with the forrest examples. Again, since my catalog has @xml:base I can dynamically construct the full path during processing by using the=20 catalog. So it will be "file:///path/to/forrest/plugins/docbook/resources/$rewriteUri/docbook.xsl" Unfortunately the Java Resolver does not support simple systemIds Hope that helps explain the difference. > > > Oh, and I can rewrite*** > > prefixes to the local location. I considered doing this for catalog.xca= t, > > but decided to leave it. It ain't broken, so don't fix it. > > The Public Identifiers that we are currently using in > our core catalogs work beautifully. yes. no need to fiddle, unless you want to make neat and reduce overhead=20 later. =2D-=20 Sean Wheller Technical Author sean@inwords.co.za http://www.inwords.co.za