[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Failing to resolve olinkdb.xml
Hi Paul, This is the result of a design decision for olinking. From the point of view of the XSLT processor, a relative path in a stylesheet is never taken relative to where the command is run. Rather, by default it is taken relative to where the stylesheet is located. I made a design decision that the location of the stylesheet is not the likely location of a targets database, for several reasons: a. the database is closely tied to the documents, b. more than one olink database may be in use, so that more than one document collection can be handled. c. the stylesheet directory is often not writable, which makes managing the database difficult. In the case of target.database.document, the template named 'select.target.database' template in common/olink.xsl opens the database using this syntax: <xsl:variable name="target.database" select="document($target.database.filename,/)"/> The "/" after the comma in the document() function means to take the location of the database as relative to the XML document being processed. That's why you see that path in the error message. If you want to change this behavior, then copy the 'select.target.database' template to your customization and remove the second argument in the document function: <xsl:variable name="target.database" select="document($target.database.filename)"/> Then the location of the file will be taken as relative to the location of the stylesheet, which matches your setup. Or supply a full path for the target.database.document (which can be remapped with a catalog file if necessary). Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "Paul Moloney" <paul_moloney@hotmail.com> To: <docbook-apps@lists.oasis-open.org> Sent: Tuesday, February 07, 2006 9:55 AM Subject: [docbook-apps] Failing to resolve olinkdb.xml > I'm trying to implement olink'ing in a set of documents for the > first time and encountering the following problem. > > The test document structure is like this: > > /- > |- valista_manual.xsl (customised layer) > |- olinkdb.xml > |-src > |-administrator_guide > |-administrator_guide.xml > |- getting_started > |-getting_started.xml > > However, when--from the above root directory--I run the following > command: > > xsltproc --output administrator_guide.fo \ > --stringparam target.database.document "olinkdb.xml" \ > --stringparam current.docid "administrator_guide" \ > valista_manual.xsl \ > src/administrator_guide/administrator_guide.xml > > > ..then the output contains the following error: > > warning: failed to load external entity > "src/administrator_guide/olinkdb.xml" > Olink error: could not open target database 'olinkdb.xml'. > > Why is the command looking for olinkdb.xml in the administrator_guide > directory rather than in the same directory as the command is run, can > anyone guess? > > Thanks, > > > -pm > > http://oceanclub.blogspot.com > > "I remember when I posed as a customs officer so that I could > meet Oscar Wilde. I said to him "Have you anything to declare?" > He said "I have nothing to declare but my genius." I said "I'll > put that down as nothing then shall I?" For I am the wittiest > man on Earth." > > --------------------------------------------------------------------- > 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]