Cisco Systems OL-27172-01 Mobility Aid User Manual


 
5-20
Cisco Broadband Access Center 3.8 Administrator Guide
OL-27172-01
Chapter 5 Configuration Templates Management
Authoring Configuration Templates
XML does not support the left angle bracket (<) and the ampersand (&). Instead, use the predefined
entities (described in Table 5-3) for these characters.
The following examples illustrate various conditional expressions:
Example 5-15 Numerical Test Condition
Using 100 as a number:
<tc:if test="VAR(name=/cpe/version, defaultValue=20) greaterThan 100">
<Parameter>
<Name>Enable</Name>
<Value>false</Value>
</Parameter>
</tc:if>
Example 5-16 String Test Condition
Using 100 as string:
<tc:if test="VAR(name=/cpe/version, defaultValue=20) greaterThan '100'">
<Parameter>
<Name>Enable</Name>
<Value>false</Value>
</Parameter>
</tc:if>
Note When comparing digits as numbers, 20 is less than 100. However, when an operator is used with
a string, comparing digits as strings makes 20 greater than 100.
Example 5-17 Looking for Text in a Cisco BAC Property
Using text cwmp:
Conditional expression when..otherwise
Conditional expression choose
Table 5-2 Conditional Template Constructs Supported in Cisco BAC (continued)
Table 5-3 XML Definitions in Cisco BAC
Instead of ... Use ...
< (less than) &lt;
<= (less than or equal) &lt;=
> (greater than) &gt;
>= (greater than or equals) &gt;=
& (ampersand) &amp;
' (apostrophe) &apos;
" (double quotes) &quot;