+ <xsl:choose>
+ <xsl:when test="(not($blacklist_suffix) or not(contains(@name,$blacklist_suffix)))">
+ <!-- We're OK on this node, simply copy the nodespec -->
+ <xsl:copy-of select="."/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="not(max_rate)">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <max_rate><xsl:value-of select="$max-node-kbps"/></max_rate>
+ </xsl:copy>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test=". > $max-node-kbps">
+ <max_rate><xsl:value-of select="$max-node-kbps"/></max_rate>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>