HP e-Commerce / XML director server appliance sa8250 - Users Guide

C H A P T E R 2 HP e-Commerce/XML Director Server Appliance SA8250 User Guide
16
Each element together with the operator selects a set of nodes in the
XML data tree relative to a context node. This set of nodes must
match the name of the element specified in a step. Every path starts
with the root node as the first context node. Nodes selected in a step
form the set of context nodes for the following step.
You can specify an element as *, which selects any element relative
to the context node. You can also specify an optional filter at the end
of a path to further refine XML data stream parsing.
Using the employee from the earlier XML data example, an XML
pattern on the SA8250 might look like this:
* & //address[zip > 90000]
where:
* is a Layer 7 (RICH) wildcard expression
//address[zip > 90000] is an XML expression
For more information on XML patterns, see XML Pattern Creation
later in this chapter.
Because the server is configured for any zip codes greater than 90000,
and John K. Smiths zip code is 92128, the SA8250 directs his
employee data to that server.
You can specify an attribute as @AttributeName, or @* to select any
attribute relative to the context node.
Filters are identified by a FilterExpression enclosed within square
brackets, [ ]. They 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 Boolean TRUE if the server is
a valid choice, or FALSE if that server will not be used.
An element or attribute by itself inside a filter expression specifies an
existence test. For example:
//a[b or @c]