Cisco Systems OL-27172-01 Mobility Aid User Manual


 
5-21
Cisco Broadband Access Center 3.8 Administrator Guide
OL-27172-01
Chapter 5 Configuration Templates Management
Authoring Configuration Templates
<tc:if test="contains(VAR(name=/cpe/UsrStr, defaultValue=linksys), 'cwmp')">
<Parameter>
<Name>Enable</Name>
<Value>false</Value>
</Parameter>
</tc:if>
Example 5-18 Looking for Text in Single Quotes
Using cwmp’s test:
<tc:if test="contains(VAR(name=/cpe/UsrStr, defaultValue=linksys), &quot;cwmp's
test&quot;)">
<Parameter>
<Name>Enable</Name>
<Value>false</Value>
</Parameter>
</tc:if>
Example 5-19 Looking for Text in Double Quotes
Using cwmp test:
<tc:if test="contains(VAR(name=/cpe/UsrStr, defaultValue=linksys), 'cwmp
&quot;test&quot;')">
<Parameter>
<Name>Enable</Name>
<Value>false</Value>
</Parameter>
</tc:if>
The text blocks that you can enclose within the conditional statements are limited to Parameter and
Object elements.
Example 5-20 Choosing from Alternatives (Using choose and when Syntax)
The following example describes the syntax when using tc:choose and tc:when:
<tc:choose>
<tc:when test="VAR(name=/cpe/version,defaultValue=11) greaterThan 12">
<Parameter>
<Name>UpgradeAvailable</Name>
<Value>true</Value>
</Parameter>
</tc:when>
<tc:when test="VAR(name=/db/version,defaultValue=15) greaterThan 14">
<Parameter>
<Name>UpgradeAvailable</Name>
<Value>true</Value>
</Parameter>
</tc:when>
<tc:otherwise>
<Parameter>
<Name>UpgradeAvailable</Name>
<Value>false</Value>
</Parameter>
</tc:otherwise>
</tc:choose>
Example 5-21 Choosing from Alternatives (Using choose and if Syntax)
The following example describes the syntax when using tc:choose and tc: if: