This is the mail archive of the xsl-list@mulberrytech.com mailing list .


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

Re: what processor is using this stylesheet


"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

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