This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] Changing local customizations depending on XSLT processor?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]