C H A P T E R 3
XML Operations
25
required arguments. Wrong numbers of arguments or arguments not
of the required type result in errors. The result of the FunctionCall
expression is the result returned by the function.
.
Function
Description
starts-with(value,
substring)
The starts-with function tests whether the string value of value starts the
specified substring. value can be either an element, attribute, or function
call that returns a string value. substring must be a literal value enclosed
in single or double quotes.
contains(value,
substring)
The contains function tests whether value contains the specified
substring. value can be either an element, attribute, or function call that
returns a string value. substring must be a literal value enclosed in single
or double quotes.
translate(value,
fromString,
toString)
The translate function replaces characters in the value string if they
appear in the fromString with the corresponding characters in the
toString. If a character appears in fromString but not in the corresponding
position in toString, the character will be dropped from the value string.
The result string is returned. value can be either an element, attribute, or
function call that returns a string value. Both fromString and toString
have to be a literal value enclosed in single or double quotes.
Function Calls
Sample Pattern
Description
//Order[starts-with
(PartNumber, “001”)]
Matches if there is an Order element with a value of a PartNumber
child element starting with “001.”
//Part[contains
(@PartNumber, ‘12345’)]
Matches if there is a Part element with the value of a PartNumber
attribute containing “12345.”
//Part[contains(translate
(@Description,’abcdefg
hijklmnopqrstuvwxyz’,
‘ABCDEFGHIJKLMNOP
QRSTUVWXYZ’),
‘ENGINE’)]
Matches if there is a Part element with the value of a Description
attribute containing “ENGINE.” All characters in the Description
attribute are converted to uppercase before being passed to the
contains function.
Function Call Examples
Summary of Contents for P4518A - Traffic Management Server Sa7150
Page 1: ...hp e commerce xml server accelerator sa7150 user guide ...
Page 10: ...C O N T E N T S HP e Commerce XML Server Accelerator SA7150 User Guide x Notes ...
Page 16: ...C H A P T E R 1 HP e Commerce XML Server Accelerator SA7150 User Guide 6 Notes ...
Page 24: ...C H A P T E R 2 HP e Commerce XML Server Accelerator SA7150 User Guide 14 Notes ...
Page 62: ...C H A P T E R 3 HP e Commerce XML Server Accelerator SA7150 User Guide 52 Notes ...
Page 80: ...C H A P T E R 4 HP e Commerce XML Server Accelerator SA7150 User Guide 70 Notes ...
Page 140: ...C H A P T E R 6 HP e Commerce XML Server Accelerator SA7150 User Guide 130 Notes ...
Page 158: ...C H A P T E R 8 HP e Commerce XML Server Accelerator SA7150 User Guide 148 Notes ...
Page 170: ...A P P E N D I X B HP e Commerce XML Server Accelerator SA7150 User Guide 160 Notes ...
Page 174: ...A P P E N D I X C HP e Commerce XML Server Accelerator SA7150 User Guide 164 Notes ...
Page 175: ...Regulatory Information Taiwan Class A EMI Statement ...
Page 184: ...A P P E N D I X D HP e Commerce XML Server Accelerator SA7150 User Guide 174 Notes ...
Page 212: ...I N D E X HP e Commerce XML Server Accelerator SA7150 User Guide 202 Notes ...