beautypg.com

Values – HP e-CommerceXML Accelerator sa7150 User Manual

Page 36

background image

C H A P T E R 3 HP e-Commerce/XML Server Accelerator SA7150 User Guide

26

Values

Values are used to specify the right operand of a comparison
expression, and can be either literals (e.g., a string) or numeric values.
Literals must be enclosed in either single or double quotes. If the
literal string contains single quotes, double quotes should be used to
enclose the string. Conversely, if the literal string contains double
quotes, it should be enclosed in single quotes. Character references
(both decimal and hexadecimal format) and predefined entities as
described in the XML specification can be used within the literal
string.

The string value of the left operand is obtained for literal equality
comparisons. If an element is specified for the left operand, only
elements without a child element should be used. Although the upper
level elements are not supported, this generally is not a problem,
since in most cases only the lowest level element contains text values.

A number can be either a decimal value or an integer. Numbers
should not be enclosed in quotes. (Numbers within quotes are treated
as literals.) Numbers are signed by preceding them with the plus (+)
or minus (-) sign. Decimal values must contain a decimal point with
at least one digit to the right of it.

A numeric comparison is either an equality comparison with a
numeric right operand or a non-equality comparison. Both the value
of the left and right operands, if necessary, are converted to numeric
values before a numeric comparison is made. If the value cannot be
converted to a number, the comparison returns false.