[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Using olinks in bibliography collection withprocessor's parameters with relative paths
Hi Bob, your quick solution (putting the bibliography database at the same directory level as the books, but in a different directory) made the trick. Thank you very much also for your very clear explanation of the general process, very appreciated. Giuseppe -- Giuseppe Monticelli :: Funambol, Inc. :: http://docs.funambol.com MediaHub - Connect Everything Mobile via the Cloud, powered by open source On Sun, Sep 11, 2011 at 10:39 AM, Bob Stayton <bobs@sagehill.net> wrote: > Hi Giuseppe, > A relative path to an olink database is taken as relative to the DocBook > document that contains the olink element. In the case of your books, that > relative path is correct and those olinks resolve. > > When a bibliography collection is processed, the biblio entries are > processed directly from the collection. That is, the stylesheet reads the > 'bibliography.collection' parameter for the filename, uses the document() > function to open the collection file, finds the biblio element that matches > the id, and applies templates to that biblio element. It does not first > copy the biblio element into the original DocBook document and then process > it. > > So in the case of your bibliography collection, that is also a DocBook > document that contains an olink, so the relative path to the database for > that olink is taken as relative to the bibliography collection file. You > can see that starting from the location of your bibliography collection > file, the relative path specified by the stylesheet param > target.database.document=../../tools/database-files/nightly/olinkdb.xml is > not a correct path to that file based on that starting point. There is no > separate param for the location of the olink database relative to the > bibliography collection. > > I think there might be a solution to this problem using xml:base, but that > will require some research and testing. The quick solution is to put your > bibliography database at the same directory level as your books, but in a > different directory. That keeps it separate from any one book, and it can > still be accessed with relative paths. It won't be "above" your books, but > it will be separate from them, and it should work. > > Bob Stayton > Sagehill Enterprises > bobs@sagehill.net > > > ----- Original Message ----- From: "Giuseppe Monticelli" > <monty@funambol.com> > To: <docbook-apps@lists.oasis-open.org> > Sent: Saturday, September 10, 2011 5:04 PM > Subject: [docbook-apps] Using olinks in bibliography collection with > processor's parameters with relative paths > > > Good morning, > > I'm experiencing a strange issue using 'bibliography.collection' > together with 'target.database.document' and relative paths with this > configuration: > > - DocBook 5.0 > - DocBook XSL ns 1.76.1 > - xsltproc (libxml 20632, libxslt 10124, libexslt 813) > > I've created a bibliography collection document > (bibliography-collection.xml) that I populated with items that I would > like to use in the different 'Reference' sections of a collection of > three different guides. These guides in turn link to several sections > of each other. > > A usual target database document (olinkdb.xml) is successfully used to > resolve olinks not only from a guide to another, but also between > different chapters of the same guide, since every chapter is also a > stand-alone XML document. > > The bibliography-collection.xml document also contains two olinks > pointing to the titles of two guides of the mentioned guides > collection, since these titles vary from a release to the next one, > and so the titles referenced in the bibliography (the 'Reference' > sections of each guide) need to be dynamically updated. > > This technique works perfectly ONLY when the > bibliography-collection.xml document is in IN THE SAME folder as the > XML documents representing the chapters of each guide. > > The problems arise when I move the bibliography-collection.xml > document a folder above, in order to share it with all the guides, > avoiding to duplicate (triplicate) it in every folder containing the > chapters of each guide: > > xsltproc \ > --xinclude \ > --output funambol-carrier-edition-installation-and-operation-guide.html \ > --stringparam ignore.image.scaling 1 \ > --stringparam use.extensions 0 \ > --stringparam target.database.document > ../../tools/database-files/nightly/olinkdb.xml \ <<<<<<<<<<<<<<< > --stringparam current.docid cared-installation-and-operation-guide \ > --stringparam olink.doctitle yes \ > --stringparam html.stylesheet styles.css \ > --stringparam bibliography.collection > ../../xml/bibliography-collection.xml \ <<<<<<<<<<<<<<< > --stringparam bibliography.numbered 1 \ > ../../tools/html.xsl \ > funambol-carrier-edition-installation-and-operation-guide.xml > > warning: failed to load external entity > "../../../tools/database-files/nightly/olinkdb.xml" <<<<<<<<<<<<<<< > (!) > Olink error: could not open target database > '../../tools/database-files/nightly/olinkdb.xml'. <<<<<<<<<<<<<<< > Error: unresolved olink: targetdoc/targetptr = > 'funambol-developers-guide/'. > ... > > Notice that when the bibliography-collection.xml document is > processed, the olinkdb.xml target database document is looked for in a > different directory than indicated, actually one more above (../../../ > instead of ../../). > > The only WORKAROUND I was able to find is to indicate the absolute > path to olinkdb.xml, i.e. > > --stringparam target.database.document > /Users/monty/docbook/tools/database-files/nightly/olinkdb.xml > > instead of > > --stringparam target.database.document > ../../tools/database-files/nightly/olinkdb.xml > > Is there a simple way to avoid at all indicating absolute paths? > > Thank you in advance for every suggestion, > > Giuseppe Monticelli > > -- > Giuseppe Monticelli :: Funambol, Inc. :: http://docs.funambol.com > > MediaHub - Connect Everything Mobile via the Cloud, powered by open source > > --------------------------------------------------------------------- > 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]