Hp e-CommerceXML Accelerator sa7150 Manuel d'utilisateur Page 33

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 212
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 32
C H A P T E R 3 XML Operations
23
Filters
Filters are identified by a FilterExpression enclosed within square
brackets, [ ]. These define a pattern within a pattern following this
general structure:
( (’/’ | ’//’) Element )? [ FilterExpression
]
Filter expressions are applied to every element returned by the
preceding path pattern. They return a match if the server is a valid
choice according to the filter expression.
The operative component of a FilterExpression is a comparison
expression or any FunctionCall expression that returns a string value,
which compares either an element or an attribute against a specified
value. An element in a FilterExpression refers to the child element of
the context node, while an attribute refers to the attribute of the
context node.
Comparison expression syntax:
(Element | Attribute | FunctionCall)
ComparisonOperator Value
FunctionCall expression syntax:
FunctionName ’(’ (Argument (’,’ Argument)*)?
’)’
You can combine comparison expressions and the FunctionCall
expression with Boolean operators and parentheses to create complex
filter expressions.
Sample Pattern Description
//PurchaseOrder
[Amount > 10000]
Matches a PurchaseOrder element with a child element Amount
value greater than 10000
//PurchaseOrder
[@CustomerID > 9000]
Matches a PurchaseOrder element with an attribute
CustomerID value greater than 9000
//PurchaseOrder
[Amount > 10000 and
@CustomerID > 9000]
Matches a PurchaseOrder element with a child element Amount
value greater than 10000 and with an attribute
CustomerID value
greater than 9000
Comparison Expression Samples
Vue de la page 32
1 2 ... 28 29 30 31 32 33 34 35 36 37 38 ... 211 212

Commentaires sur ces manuels

Pas de commentaire