Re: what processor is using this stylesheet

Subject: Re: what processor is using this stylesheet
From: Steve Tinney <stinney@xxxxxxxxxxxxx>
Date: Fri, 17 Mar 2000 12:06:03 -0500
"Carole E. Mah" wrote:
> However, test="system-property('xsl:vendor')='saxon'" does not seem to
> work

You need to determine the xsl:vendor string using a test file and then
apply that in your real tests.  This could be modularized so that one
could say:

	<xsl:import href="vendors.xsl"/>
        <xsl:variable name="vendor">
          <xsl:call-template name="set-vendor"/>
        </xsl:variable>

and in vendors.xsl:

<xsl:template name="set-vendor">
  <xsl:variable name="xsl-vendor"
                select="system-property('xsl:vendor')"/>
  <xsl:choose>
    <xsl:when test="contains($xsl-vendor,'SAXON')">
      <xsl:text>saxon</xsl:text>
    </xsl:when>
    <xsl:when test="contains($xsl-vendor,'Clark')">
      <xsl:text>xt</xsl:text>
    </xsl:when>
    <xsl:otherwise>
      <xsl:text>UNKNOWN VENDOR</xsl:text>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

(untested, except for some vendor id probing)

 Steve


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread