Re: [xslt] import - platform independence



On Fri, Apr 05, 2002 at 12:53:24PM +0200, David N. Welton wrote:
> 
> [ I hope I am sending mail to the right place - my apologies if I am
> in error. ]
> 
> In my XSL stylesheet, I do the following:
> 
>   <xsl:import href="/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl" />
> 
> but this is inconvenient because other people would like to work on
> the same system and they use different paths.  Is there a way to use
> environmental variables or something to control this?
> 

You want to use xml catalogs:

http://www.xmlsoft.org/catalog.html

The import command would then look something like this:

<xsl:import
href="http://docbook.sourceforge.net/release/xsl/1.48/html/docbook.xsl"/>

libxslt then does a catalog lookup and, if the stylesheet is properly
registered, replaces the http bit with a local path. If the stylesheet
isn't registered, it will go out to the 'net and get it.

Cheers,
John

-- 
John Fleck
jfleck@inkstain.net (h) jfleck@abqjournal.com (w)
http://www.inkstain.net http://www.abqjournal.com

"You don't want to die with the music still in you."
 - John Gardner



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]