Show Table of Contents
11.11. XPath Domain-Specific Language
Note
You may find it convenient to undertake an XPath-based evaluation of XML-based messages. Red Hat supports this by shipping a domain-specific language implementation. Use this implementation to add XPath expressions to the rule file.
- First, define the expressions in the
XPathLanguage.dslfile and use the following code to reference it in the rule set:expander XPathLanguage.dsl
- The XPath Language makes sure the message is in
JBOSS_XMLand that the following items have been defined:xpathMatch<element> : this yieldstrueif an element by this name is matched.xpathEquals<element> , <value> : this yieldstrueif the element is found and its value equals the value.xpathGreaterThan<element> , <value> : this yieldstrueif the element is found and its value is greater than the value.xpathLessThan<element> , <value> : this yieldstrueif the element is found and its value is lower then the value.
Note
Thefun_cbrquick-start demonstrates this use of XPath.Note
It is possible to define a completely different domain-specific language.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.