Re: Attribute test problem solved

Subject: Re: Attribute test problem solved
From: Steve Tinney <stinney@xxxxxxxxxxxxx>
Date: Thu, 13 Apr 2000 08:49:37 -0400
> Would there be a simpler way to test than
> this since I have to repeat this process with other priorities
> about five more times.

I'm not sure which kind of simpler way you mean, but I typically
approach lookup table problems of this kind like this:


<?xml version='1.0'?>
<xsl:stylesheet version="1.0" 

<xsl:variable name="class">
  <c code="P" means="PRIORITY"/>
  <c code="F" means="FAST"/>
  <c code="R" means="ROUTINE"/>
  <c code="S" means="SLOW"/>

<xsl:template name="get-secur-class">
  <xsl:param name="code" select="//@secur.classif"/>



<?xml version='1.0'?>
<xsl:stylesheet version="1.0" 

<xsl:include href="class.xsl"/>

<xsl:template match="/">
  <xsl:variable name="secur.class">
    <xsl:call-template name="get-secur-class"/>
   >Class = <xsl:value-of select="$secur.class"/></xsl:message>


Your '//' on the select of secur.classif, by the way, is a recipe for
slow performance, but perhaps you have no other choice.


 XSL-List info and archive:

Current Thread