Creating an XMLIN configuration > Managing patterns, blocks, and fields > Patterns > Match criteria for patterns

Match criteria for patterns
Any type of node – element, text, etc. – can be used as a trigger pattern for an XMLIN Event. A match criterion for a trigger pattern is specified as an XSLT Pattern. The XSLT Pattern describes the path to a node, and if required, additional conditions.
To specify a match criterion
1
2
In the Match field, enter the XSLT Pattern. You can use all valid XSLT patterns. See www.w3.org/TR/xslt.
Examples
These examples have the following XML input:
<?xml version="1.0"?>
  <music>List
    <CD type="western">Classic
        <Composer>Brahms</Composer>
    </CD>
    <CD type="eastern">Classic
        <Composer>Quing Mao</Composer>
    </CD>
    <CD type="Africa">Classic
        <Composer>Outou Badou</Composer>
    </CD>
 </music>
Example 4
The match criterion is specified as “/music”.
The StreamServer scans the input and finds a match in <music>. The rule is fulfilled, and the Event is triggered. The Event is triggered once in this scenario.
 
Example 5
The match criterion is specified as “/music/CD”.
The StreamServer scans the input and finds a match in <CD>. The rule is fulfilled, and the Event is triggered. The StreamServer continues to scan the input, and finds two more matches for <CD>. The rule is fulfilled, and the Event is triggered two times more. The Event is triggered three times in this scenario.
 
Example 6
The match criterion is specified as “/music/CD[2]”.
The StreamServer scans the input and finds a match in the second occurrence of <CD>. The rule is fulfilled, and the Event is triggered. The Event is triggered once in this scenario.
 
Example 7
The match criterion is specified as “/music/CD[@type=’western’]”.
The StreamServer scans the input and finds a match in <CD type="western">. The rule is fulfilled, and the Event is triggered. The Event is triggered once in this scenario.
 
Supported XSLT and XPath functions
In the XSLT Patterns, you can use the XSLT and XPath functions listed in Supported XSLT and XPath functions.
OpenText StreamServe 5.6 Updated: 2013-03-01