The SharpHog Model uses Xslt, an international standard language for manipulation of Xml, in a number of ways.  One way is in the definition of the equations that define the rates which govern the growth of the infestation being modeled.

Here are the default equations.  The SharpHog model allows for these equations to be replaced simply by including a new replacement template along with the rest of the input to the model.  Just as with all model input, this new equation is closely linked in the SPBModel data-structure.  That is, the output from a a model-run using non-standard equations will always include with it the replacement equations that were used see integrated input.

When using new equations only the changed templates are included in the input: it is not necessary to edit and replace this entire default equations file, only the particular templates you want changed.

 

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
      version="1.0"
      xmlns:msxsl="urn:schemas-microsoft-com:xslt"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:fCondInInterval="f:fCondInInterval"
      xmlns:fScaleByE="f:fScaleByE"
      xmlns:f="http://fxsl.sf.net/"
      xmlns:x="f:x-exp.xsl"
      exclude-result-prefixes="msxsl f x xs fCondInInterval fScaleByE">
  <!-- Output -->
  <xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />
  <!-- The Spot Status -->
  <xsl:variable name="ZeroHour" select="/Request/SpotStatus/ZeroHour" />
  <xsl:variable name="OrdinalHour" select="/Request/SpotStatus/OrdinalHour" />
  <xsl:variable name="OrdinalDay" select="/Request/SpotStatus/OrdinalDay" />
  <xsl:variable name="OrdinalDaySquared" select="/Request/SpotStatus/OrdinalDaySquared" />
  <xsl:variable name="HourOfDay" select="/Request/SpotStatus/HourOfDay" />
  <xsl:variable name="Latitude" select="/Request/SpotStatus/Latitude" />
  <xsl:variable name="Longitude" select="/Request/SpotStatus/Longitude" />
  <xsl:variable name="Temperature" select="/Request/SpotStatus/Temperature" />
  <xsl:variable name="LoblollyRatio" select="/Request/SpotStatus/LoblollyRatio" />
  <xsl:variable name="ShortleafRatio" select="/Request/SpotStatus/ShortleafRatio" />
  <xsl:variable name="PineBasalArea" select="/Request/SpotStatus/PineBasalArea" />
  <xsl:variable name="HardwoodBasalArea" select="/Request/SpotStatus/HardwoodBasalArea" />
  <xsl:variable name="MeanDiameterBreastHeight" select="/Request/SpotStatus/MeanDiameterBreastHeight" />
  <xsl:variable name="AverageInfestedBarkArea" select="/Request/SpotStatus/AverageInfestedBarkArea" />
  <xsl:variable name="PinesPerHectare" select="/Request/SpotStatus/PinesPerHectare" />
  <xsl:variable name="MeanPineAge" select="/Request/SpotStatus/MeanPineAge"/>
  <xsl:variable name="FiveYearGrowth" select="/Request/SpotStatus/FiveYearGrowth"/>
  <!-- The Tree Distribution -->
  <xsl:variable name="TreesAttacking" select="/Request/TreeCount/Attacking" />
  <xsl:variable name="TreesParent" select="/Request/TreeCount/Parent" />
  <xsl:variable name="TreesEgg" select="/Request/TreeCount/Egg" />
  <xsl:variable name="TreesImmature" select="/Request/TreeCount/Immature" />
  <xsl:variable name="TreesBrood" select="/Request/TreeCount/Brood" />
  <xsl:variable name="TreesEmerging" select="/Request/TreeCount/Emerging" />
  <!-- Matches Document Root -->
  <xsl:template match="/">
    <xsl:element name="Result">
      <xsl:for-each select="/Request/Value/*">
        <xsl:element name="{string(.)}">
          <xsl:element name="{local-name(.)}">
            <xsl:apply-templates select="."/>
          </xsl:element>
        </xsl:element>
      </xsl:for-each>
    </xsl:element>
  </xsl:template>
  <!-- Attacking Density -->
  <xsl:variable name="AttackingDensity">
    <xsl:variable name="Equ">
      <xsl:value-of select="2 * (6.5567561 - 0.0074305 * $PinesPerHectare + 1.0535825 * $LoblollyRatio)"/>
    </xsl:variable>
    <xsl:choose>
      <xsl:when test="$Equ &lt; 3">3</xsl:when>
      <xsl:when test="$Equ &gt; 19.17">19.17</xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$Equ"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:variable>
  
  <!-- Parent Density -->
  <xsl:variable name="ParentDensity">
    <xsl:value-of select="$AttackingDensity"/>
  </xsl:variable>
  
  <!-- Egg Density -->
  <xsl:variable name="EggDensity">
    <xsl:variable name="Equ">
      <xsl:value-of select="164.4660239 + 49.3082156 * $LoblollyRatio - 0.1304835 * $PinesPerHectare"/>
    </xsl:variable>
    <xsl:choose>
      <xsl:when test="$Equ &lt; 58.7">58.7</xsl:when>
      <xsl:when test="$Equ &gt; 268.5">268.5</xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$Equ"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:variable>
  
  <!-- Immature Density -->
  <xsl:variable name="ImmatureDensity">
    <xsl:value-of select="$EggDensity * (1.0 - $EggMortality)"/>
  </xsl:variable>
  
  <!-- Brood Density -->
  <xsl:variable name="BroodDensity">
    <xsl:value-of select="$ImmatureDensity * (1.0 - $ImmatureMortality)" />
  </xsl:variable>
  
  <!-- Emerging Density -->
  <xsl:variable name="EmergingDensity">
    <xsl:value-of select="$BroodDensity * (1.0 - $BroodMortality)" />
  </xsl:variable>
 
  <!-- Parent Mortality -->
  <xsl:variable name="ParentMortality">
    0.35
  </xsl:variable>
  <!--  //    Template for checking the min and max for Emerging or Attacking Mortality -->
  <xsl:template name="MinMaxEmrAtt">
    <xsl:param name="InMort" />
    <xsl:choose>
      <xsl:when test="$InMort &lt;= 0">
        <xsl:value-of select="0.001" />
      </xsl:when>
      <xsl:when test="$InMort &gt;= 1">
        <xsl:value-of select="0.999" />
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$InMort" />
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  <!-- Emerging Mortality -->
  <xsl:variable name="EmergingMortality">
    <xsl:variable name="EmrRoughMort" select="0.3227" />
    <!--  //  Adjust Emerging Mortality according to PBA -->
    <xsl:variable name="EmrPbaMort">
      <xsl:call-template name="EmrPbaTemplate">
        <xsl:with-param name="InMort" select="$EmrRoughMort" />
      </xsl:call-template>
    </xsl:variable>
    <!--  //    Adjust Emerging Mortality according to HBA -->
    <xsl:variable name="EmrHbaMort">
      <xsl:call-template name="EmrHbaTemplate">
        <xsl:with-param name="InMort" select="$EmrPbaMort" />
      </xsl:call-template>
    </xsl:variable>
    <!--  //    Our Mortality
          //    Call the MinMax template with 
          //    parameter of HbaMort -->
    <xsl:call-template name="MinMaxEmrAtt">
      <xsl:with-param name="InMort" select="$EmrHbaMort" />
    </xsl:call-template>
  </xsl:variable>
  <!--  //    Two Supporting Templates for the Emerging Mortality-->
  <!--  //    Template for adjusting according Emerging Mortality to HBA -->
  <xsl:template name="EmrHbaTemplate">
    <xsl:param name="InMort" />
    <xsl:choose>
      <!--  //    Less than or equal 20 no change -->
      <xsl:when test="$HardwoodBasalArea &lt;= 20">
        <xsl:value-of select="$InMort" />
      </xsl:when>
      <!--  //    Otherwise (above 20HBA) tweak thusly -->
      <xsl:otherwise>
        <xsl:value-of select="$InMort + 0.1 * (1.0-$InMort)" />
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  <!--  //  Template for adjusting Emerging Mortality according to PBA -->
  <xsl:template name="EmrPbaTemplate">
    <xsl:param name="InMort" />
    <xsl:choose>
      <!--  //    Below 21 -->
      <xsl:when test="$PineBasalArea &lt; 21">
        <xsl:value-of select="$InMort + 0.07 * (1.0 - $InMort)" />
      </xsl:when>
      <!--  //    or Over 30 -->
      <xsl:when test="$PineBasalArea &gt; 30">
        <xsl:value-of select="$InMort + 0.07 * ($InMort - 1.0)" />
      </xsl:when>
      <!--  //    No change -->
      <xsl:otherwise>
        <xsl:value-of select="$InMort" />
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  <!-- Attacking Mortality -->
  <xsl:variable name="AttackingMortality">
    <!--  //    Adjust Attacking Mortality according to PBA -->
    <xsl:variable name="AttRoughMort" select="0.2525"/>
    <xsl:variable name="PbaMort">
      <xsl:call-template name="AttPbaTemplate">
        <xsl:with-param name="InMort" select="$AttRoughMort" />
      </xsl:call-template>
    </xsl:variable>
    <!--  //    Adjust Attacking Mortality according to Mean Pine Age -->
    <xsl:variable name="AgeMort">
      <xsl:call-template name="AttAgeTemplate">
        <xsl:with-param name="InMort" select="$PbaMort" />
      </xsl:call-template>
    </xsl:variable>
    <!--  //    Adjust Attacking Mortality according to Growth -->
    <xsl:variable name="GrowthMort">
      <xsl:call-template name="AttGrowthTemplate">
        <xsl:with-param name="InMort" select="$AgeMort" />
      </xsl:call-template>
    </xsl:variable>
    <!--  //    Our Mortality
          //    Call the MinMax template with 
          //    parameter of Growth -->
    <xsl:call-template name="MinMaxEmrAtt">
      <xsl:with-param name="InMort" select="$GrowthMort" />
    </xsl:call-template>
  </xsl:variable>
  <!--  //    Three Supporting Templates for the Attacking Mortality-->
  <!--  //    Template for Attacking Mortality according to PBA -->
  <xsl:template name="AttPbaTemplate">
    <xsl:param name="InMort" />
    <xsl:choose>
      <xsl:when test="$PineBasalArea &lt; 21">
        <xsl:value-of select="$InMort + 0.03 * (1.0 - $InMort)" />
      </xsl:when>
      <xsl:when test="$PineBasalArea &gt; 30">
        <xsl:value-of select="$InMort + 0.03 * ($InMort - 1.0)" />
      </xsl:when>
      <!--  //    No change -->
      <xsl:otherwise>
        <xsl:value-of select="$InMort" />
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  <!--  //    Adjust Attacking Mortality according to Growth -->
  <xsl:template name="AttGrowthTemplate">
    <xsl:param name="InMort" />
    <xsl:choose>
      <xsl:when test="$FiveYearGrowth &gt; -1 and $FiveYearGrowth &lt; 10">
        <xsl:value-of select="$InMort + 0.05 * ($InMort - 1.0)" />
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$InMort" />
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  <!--  //    Adjust Attacking Mortality according to Mean Pine Age -->
  <xsl:template name="AttAgeTemplate">
    <xsl:param name="InMort" />
    <xsl:choose>
      <xsl:when test="$MeanPineAge &gt; 80">
        <xsl:value-of select="$InMort + 0.05 * ($InMort - 1.0)" />
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$InMort" />
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <!-- Egg Mortality -->
  <xsl:variable name="EggMortality">
    <xsl:variable name="Exponent">
      <xsl:value-of select="-29.26902 
                    - 
                    0.01075 * $PinesPerHectare 
                    + 
                    29.36783 * ($PineBasalArea div ($PineBasalArea + $HardwoodBasalArea))
                    + 
                    3.09594 * $ShortleafRatio"/>
    </xsl:variable>
    <xsl:variable name="Equ">
      <xsl:call-template name="exp">
        <xsl:with-param name="pX" select="$Exponent"/>
      </xsl:call-template>
    </xsl:variable>
    <xsl:choose>
      <xsl:when test="$Equ &lt; 0.001">0.001</xsl:when>
      <xsl:when test="$Equ &gt; 0.1474">0.1474</xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$Equ"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:variable>
  
  <!-- Immature Mortality -->
  <xsl:variable name="ImmatureMortality">
    <xsl:variable name="Equ">
      <xsl:value-of select="0.67798
                            +
                            0.00206 * $OrdinalDay
                            -
                            0.00000531 * $OrdinalDaySquared
                            -
                            0.00327 * ($HardwoodBasalArea + $PineBasalArea)
                            +
                            0.09300 * $LoblollyRatio"/>
    </xsl:variable>
    <xsl:choose>
      <xsl:when test="$Equ &lt; 0.35">0.35</xsl:when>
      <xsl:when test="$Equ &gt; 0.9496">0.9496</xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$Equ"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:variable>
  
  <!-- Brood Mortality -->
  <xsl:variable name="BroodMortality">
    <xsl:variable name="Equ">
      <xsl:value-of select="0.63672
                            -
                            0.00355 * $OrdinalDay
                            +
                            0.00000841 * $OrdinalDaySquared
                            +
                            0.31966 * ($PineBasalArea div ($PineBasalArea + $HardwoodBasalArea))
                            -
                            0.20753 * $LoblollyRatio"/>
    </xsl:variable>
    <xsl:choose>
      <xsl:when test="$Equ &lt; 0.1">0.1</xsl:when>
      <xsl:when test="$Equ &gt; 0.8290">0.8290</xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$Equ"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:variable>
  <!-- Initial Populations -->
  <xsl:template match="InitialPopulation">
    <xsl:variable name="Stage" select="." />
    <xsl:choose>
      <xsl:when test="$Stage=string('Attacking')">
        <xsl:value-of select="(0.75 * $TreesAttacking + 0.2 * $TreesParent) * $AttackingDensity * $AverageInfestedBarkArea"/>
      </xsl:when>
      <xsl:when test="$Stage=string('Parent')">
        <xsl:value-of select="(0.2 * $TreesAttacking + 0.6 * $TreesParent + 0.1 * $TreesEgg) * $ParentDensity * $AverageInfestedBarkArea"/>
      </xsl:when>
      <xsl:when test="$Stage=string('Egg')">
        <xsl:value-of select="(0.05 * $TreesAttacking + 0.2 * $TreesParent + 0.6 * $TreesEgg) * $EggDensity * $AverageInfestedBarkArea"/>
      </xsl:when>
      <xsl:when test="$Stage=string('Immature')">
        <xsl:value-of select="(0.3 * $TreesEgg + 0.95 * $TreesImmature + 0.1 * $TreesBrood) * $ImmatureDensity * $AverageInfestedBarkArea"/>
      </xsl:when>
      <xsl:when test="$Stage=string('Brood')">
        <xsl:value-of select="(0.05 * $TreesImmature + 0.6 * $TreesBrood) * $BroodDensity * $AverageInfestedBarkArea"/>
      </xsl:when>
      <xsl:when test="$Stage=string('Emerging')">
        <xsl:value-of select="0.3 * $TreesBrood * $EmergingDensity * $AverageInfestedBarkArea"/>
      </xsl:when>
    </xsl:choose>
  </xsl:template>
  <!-- Densities -->
  <xsl:template match="Density">
    <xsl:variable name="Stage" select="." />
    <xsl:choose>
      <xsl:when test="$Stage=string('Attacking')">
        <xsl:value-of select="$AttackingDensity"/>
      </xsl:when>
      <xsl:when test="$Stage=string('Parent')">
        <xsl:value-of select="$ParentDensity"/>
      </xsl:when>
      <xsl:when test="$Stage=string('Egg')">
        <xsl:value-of select="$EggDensity" />
      </xsl:when>
      <xsl:when test="$Stage=string('Immature')">
        <xsl:value-of select="$ImmatureDensity" />
      </xsl:when>
      <xsl:when test="$Stage=string('Brood')">
        <xsl:value-of select="$BroodDensity" />
      </xsl:when>
      <xsl:when test="$Stage=string('Emerging')">
        <xsl:value-of select="$EmergingDensity" />
      </xsl:when>
    </xsl:choose>
  </xsl:template>
  <!-- Mortalities -->
  <xsl:template match="Mortality">
    <xsl:variable name="Stage" select="." />
    <xsl:choose>
      <xsl:when test="$Stage=string('Attacking')">
        <xsl:value-of select="$AttackingMortality"/>
      </xsl:when>
      <xsl:when test="$Stage=string('Parent')">
        <xsl:value-of select="$ParentMortality"/>
      </xsl:when>
      <xsl:when test="$Stage=string('Egg')">
        <xsl:value-of select="$EggMortality" />
      </xsl:when>
      <xsl:when test="$Stage=string('Immature')">
        <xsl:value-of select="$ImmatureMortality" />
      </xsl:when>
      <xsl:when test="$Stage=string('Brood')">
        <xsl:value-of select="$BroodMortality" />
      </xsl:when>
      <xsl:when test="$Stage=string('Emerging')">
        <xsl:value-of select="$EmergingMortality" />
      </xsl:when>
    </xsl:choose>
  </xsl:template>
  <!-- Activities -->
  <xsl:template match="Activity">
    <xsl:variable name="Stage" select="." />
    <xsl:choose>
      <xsl:when test="$Stage=string('Attacking')">
        <xsl:value-of select="$Activity * 4.06"/>
      </xsl:when>
      <xsl:when test="$Stage=string('Parent')">
        <xsl:value-of select="$Activity * 55.16 div 24.0"/>
      </xsl:when>
      <xsl:when test="$Stage=string('Egg')">
        <xsl:value-of select="0.0"/>
      </xsl:when>
      <xsl:when test="$Stage=string('Immature')">
        <xsl:value-of select="$Activity * 0.233"/>
      </xsl:when>
      <xsl:when test="$Stage=string('Brood')">
        <!-- 1.7 Multiplier represents lab to field condition change. pg36 Hines -->
        <xsl:value-of select="number($BroodActivity) * 1.7"/>
      </xsl:when>
      <xsl:when test="$Stage=string('Emerging')">
        <xsl:value-of select="0.0"/>
      </xsl:when>
    </xsl:choose>
  </xsl:template>
  <!-- Developments -->
  <xsl:template match="Development">
    <xsl:variable name="Stage" select="." />
    <xsl:choose>
      <xsl:when test="$Stage=string('Attacking')">
        <xsl:value-of select="$Activity * 4.06 div 24.0"/>
      </xsl:when>
      <xsl:when test="$Stage=string('Parent')">
        <xsl:value-of select="$Activity * 4.0 div 24.0"/>
      </xsl:when>
      <xsl:when test="$Stage=string('Egg')">
        <xsl:value-of select="$Activity div 24.0"/>
      </xsl:when>
      <xsl:when test="$Stage=string('Immature')">
        <xsl:value-of select="$Activity * 0.233 div 24.0"/>
      </xsl:when>
      <xsl:when test="$Stage=string('Brood')">
        <xsl:value-of select="$BroodActivity * 1.7 div 24.0"/>
      </xsl:when>
      <xsl:when test="$Stage=string('Emerging')">
        <xsl:choose>
          <xsl:when test="$HourOfDay &lt; 8">0.0</xsl:when>
          <xsl:when test="SHourOfDay &gt;= 20">0.0</xsl:when>
          <xsl:when test="$Temperature &lt; 57.0">0.0</xsl:when>
          <xsl:otherwise>0.20646</xsl:otherwise>
        </xsl:choose>
      </xsl:when>
    </xsl:choose>
  </xsl:template>
  <!-- Activity Observations Temperature Array -->
  <xsl:variable name="Temperatures">
    <xsl:text>0, 49.9, 50, 59, 68, 77, 81.5, 86, 90.5, 92.5, 92.6, 130, 140</xsl:text>
  </xsl:variable>
  <!-- Activity Observations Base Beetle Rates Array -->
  <xsl:variable name="Rates">
    <xsl:text>0, 0, 0.0309, 0.0852, 0.1438, 0.2207, 0.2599, 0.2871, 0.2485, 0.1961, 0, 0, 0</xsl:text>
  </xsl:variable>
  <!-- Brood Stage Activity Observations Temperature Array -->
  <xsl:variable name="BroodTemperatures">
    <xsl:text>0, 54.4, 54.5, 59, 60.98, 68, 69.8, 71.96, 
            77, 80.06, 80.6, 86, 87.98, 87.99, 130</xsl:text>
  </xsl:variable>
  <!-- Brood Stage Activity Observations Rates Array -->
  <xsl:variable name="BroodRates">
    <xsl:text>0, 0, 0.054, 0.069, 0.088, 0.16, 0.156, 0.158, 
            0.152, 0.177, 0.161, 0.153, 0.189, 0, 0</xsl:text>
  </xsl:variable>
  <!-- Base Beetle Activity Level -->
  <xsl:variable name="Activity">
    <xsl:call-template name="Interpolate">
      <xsl:with-param name="temperature" select="$Temperature"/>
      <xsl:with-param name="temps">
        <xsl:call-template name="CSVBranch">
          <xsl:with-param name="list" select="$Temperatures" />
        </xsl:call-template>
      </xsl:with-param>
      <xsl:with-param name="rates">
        <xsl:call-template name="CSVBranch">
          <xsl:with-param name="list" select="$Rates"/>
        </xsl:call-template>
      </xsl:with-param>
    </xsl:call-template>
  </xsl:variable>
  <!-- Brood Stage Activity Level -->
  <xsl:variable name="BroodActivity">
    <xsl:call-template name="Interpolate">
      <xsl:with-param name="temperature" select="$Temperature"/>
      <xsl:with-param name="temps">
        <xsl:call-template name="CSVBranch">
          <xsl:with-param name="list" select="$BroodTemperatures" />
        </xsl:call-template>
      </xsl:with-param>
      <xsl:with-param name="rates">
        <xsl:call-template name="CSVBranch">
          <xsl:with-param name="list" select="$BroodRates"/>
        </xsl:call-template>
      </xsl:with-param>
    </xsl:call-template>
  </xsl:variable>
  <!-- Interpolate Template -->
  <xsl:template name="Interpolate">
    <xsl:param name="temperature"/>
    <xsl:param name="temps" />
    <xsl:param name="rates"/>
    <xsl:variable name="tmin" select="msxsl:node-set($temps)/Value[.&lt;=$temperature][last()]" />
    <!-- Assumption is made there will exist a maximum above input -->
    <xsl:variable name="tmax" select="msxsl:node-set($temps)/Value[.&gt;$temperature][1]" />
    <xsl:variable name="ind">
      <xsl:for-each select="msxsl:node-set($temps)/Value">
        <xsl:if test=".=$tmin">
          <xsl:value-of select="position()"/>
        </xsl:if>
      </xsl:for-each>
    </xsl:variable>
    <xsl:variable name="rateA" select="msxsl:node-set($rates)/Value[position()=$ind]"/>
    <xsl:variable name="rateB" select="msxsl:node-set($rates)/Value[position()=$ind+1]"/>
    <!-- Assumption is made there is a difference between tmin and tmax -->
    <xsl:value-of select="(($temperature - $tmin) div ($tmax - $tmin)) * ($rateB - $rateA) + $rateA"/>
  </xsl:template>
  <!-- CSV Branch Template -->
  <xsl:template name="CSVBranch">
    <xsl:param name="list"/>
    <xsl:variable name="first" select="substring-before($list, ',')"/>
    <xsl:variable name="rest" select="substring-after($list, ',')" />
    <xsl:if test="$list">
      <xsl:choose>
        <xsl:when test="$first">
          <xsl:element name="Value">
            <xsl:value-of select="normalize-space($first)"/>
          </xsl:element>
        </xsl:when>
        <xsl:otherwise>
          <xsl:element name="Value">
            <xsl:value-of select="normalize-space($list)"/>
          </xsl:element>
        </xsl:otherwise>
      </xsl:choose>
      <xsl:call-template name="CSVBranch">
        <xsl:with-param name="list" select="normalize-space($rest)"/>
      </xsl:call-template>
    </xsl:if>
  </xsl:template>
</xsl:stylesheet>

 

 

Check XHTML « spb.xanderlih.com Copyright © Xander Lih 2000-2012  » Check CSS