This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: custom xsl stylesheet and import path
- From: "Matt G." <matt_g_ at hotmail dot com>
- To: johannes at zellner dot org
- Cc: docbook at lists dot oasis-open dot org
- Date: Wed, 01 May 2002 03:47:23 +0000
- Subject: DOCBOOK: Re: custom xsl stylesheet and import path
- Bcc:
>From: Johannes Zellner <johannes@zellner.org>
>To: docbook@lists.oasis-open.org
>Subject: DOCBOOK: custom xsl stylesheet and import path
>Date: Mon, 29 Apr 2002 21:17:55 +0200
>
>Can I have something like
>
> <xsl:import href = '$PATH_TO_DOKBOOK/chunk.xsl'/>
Yes, sort of. since XSLT is XML, you can actually use an entity reference.
For example, when building your document on different systems, your script
(e.g. Makefile) that invokes the XSLT processor defines the entity
'xdbk_xsl_root', via a command-line option. Then, your xsl:import element
would look like this:
<xsl:import href="&xdbk_xsl_root;/chunk.xsl"/>
I'm honestly quite surprised that no one suggested this, already. If your
XSLT processor doesn't support entity definition as a command-line option,
you can always have your build script dynamically generate it as an external
entity, in a platform independent location (e.g. the current directory).
As other people have suggested, you could use catalog files to redirect the
URI at the proper location, if your tools support them.
Matt
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com