This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] Changing local customizations depending on XSLT processor?
- From: Bob Stayton <bobs at sco dot com>
- To: Steinar Bang <sb at dod dot no>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Tue, 8 Apr 2003 20:52:14 -0700
- Subject: Re: [docbook-apps] Changing local customizations depending on XSLT processor?
- References: <87adf0n0jk.fsf@doohan.bang.priv.no>
On Tue, Apr 08, 2003 at 11:26:23PM +0200, Steinar Bang wrote:
> Is it possible to use XSLT conditionals and xsl:vendor or
> xsl:vendor-url, to only set values when a particular XSLT processor is
> used?
>
> Specifically, I would like to only set these variables when using
> Saxon or Xalan, but not while running xsltproc:
>
> <xsl:param name="use.extensions" select="'1'" />
> <xsl:param name="textinsert.extension" select="'1'" />
Yes, you can do something like this:
<xsl:param name="use.extensions">
<xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
<xsl:choose>
<xsl:when test="contains($vendor, 'SAXON')>
<xsl:value-of select="1"/>
</xsl:when>
etc.
<xsl:otherwise>
<xsl:value-of select="0"/>
</xsl:otherwise>
</xsl:param>
--
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
The SCO Group fax: (831) 429-1887
email: bobs at sco dot com
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe at lists dot oasis-open dot org
For additional commands, e-mail: docbook-apps-help at lists dot oasis-open dot org