xsl-list
[Top] [All Lists]

[xsl] xsL:with-param, xsl:-param emptiness, Xalan and xsltproc

2006-03-23 08:15:36
I've tried both xalan (2.7.0) and xsltproc (compiled against libxml 20623, libxslt 10115 and libexslt 812) and can't get xsl:with-param calls to show up in my xsl:param arguments to templates. The included xsl shows the various forms/syntaxes I've tried, to no avail. Since both Xalan and xsltproc exhibit the same behavior, the problem must lie in my construct or syntax. Any help is greatly appreciated.

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:saxon="http://icl.com/saxon";
extension-element-prefixes="saxon" >
<xsl:output method="xml"/>

<xsl:template match="/">
 <xsl:apply-templates select="*"/>
 <xsl:for-each select="physInterfaceTableRow">
    <xsl:choose>
       <xsl:when test="physInterfaceOsName='eth0'">
          <xsl:call-template name="physInterfaceSupportedAutonegotiation">
            <xsl:with-param name="SupportedNegotiate" select="'true'"/>
          </xsl:call-template>
          <xsl:call-template name="physInterfaceAdvertisedAutonegotiation">
<xsl:with-param name="AdvertisedNegotiate">'true'</xsl:with-param>
          </xsl:call-template>
          <xsl:call-template name="physInterfaceDuplex">
            <xsl:with-param name="DuplexCapability">full</xsl:with-param>
          </xsl:call-template>
          <xsl:call-template name="physInterfaceBandwidthLimit">
            <xsl:with-param name="BandwidthLimit">4391</xsl:with-param>
          </xsl:call-template>
          <xsl:call-template name="physInterfaceSpeed">
            <xsl:with-param name="BandwidthLimit">4391</xsl:with-param>
          </xsl:call-template>
       </xsl:when>
       <xsl:when test="physInterfaceOsName='eth1'">
           <xsl:apply-templates>
             <xsl:with-param name="SupportedNegotiate" select="true"/>
<xsl:with-param name="AdvertisedNegotiate">true</xsl:with-param>
            <xsl:with-param name="DuplexCapability">full</xsl:with-param>
            <xsl:with-param name="BandwidthLimit">4391</xsl:with-param>
           </xsl:apply-templates>
       </xsl:when>
       <xsl:when test="physInterfaceOsName='eth2'">
           <xsl:apply-templates>
            <xsl:with-param name="SupportedNegotiate">true</xsl:with-param>
<xsl:with-param name="AdvertisedNegotiate">true</xsl:with-param>
            <xsl:with-param name="DuplexCapability">full</xsl:with-param>
            <xsl:with-param name="BandwidthLimit">4391</xsl:with-param>
           </xsl:apply-templates>
       </xsl:when>
    </xsl:choose>
  </xsl:for-each>
</xsl:template>


<xsl:template match="*">
<xsl:copy>
  <xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>

<xsl:template match="physInterfaceTableRow">
<xsl:element name="physInterfaceTableRow">
<xsl:apply-templates/>
</xsl:element>
</xsl:template>

<xsl:template match="physInterfaceSupportedAutonegotiation">
 <xsl:param name="SupportedNegotiate"/>
<xsl:element name="physInterfaceSupportedAutonegotiation"><xsl:value-of select='$SupportedNegotiate'/></xsl:element>
</xsl:template>

<xsl:template match="physInterfaceAdvertisedAutonegotiation">
 <xsl:param name="AdvertisedNegotiate"/>
<xsl:element name="physInterfaceAdvertisedAutonegotiation"><xsl:value-of select="$AdvertisedNegotiate"/></xsl:element>
</xsl:template>

<xsl:template match="physInterfaceDuplex">
 <xsl:param name="DuplexCapability"/>
<xsl:element name="physInterfaceDuplex"><xsl:value-of select="$DuplexCapability"/></xsl:element>
</xsl:template>

<xsl:template match="physInterfaceBandwidthLimit">
 <xsl:param name="BandwidthLimit"/>
<xsl:element name="physInterfaceBandwidthLimit"><xsl:value-of select="$BandwidthLimit"/></xsl:element>
</xsl:template>

<xsl:template match="physInterfaceSpeed">
 <xsl:param name="BandwidthLimit"/>
<xsl:element name="physInterfaceSpeed"><xsl:value-of select="$BandwidthLimit"/></xsl:element>
</xsl:template>

</xsl:stylesheet>


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--