Requirement
we would like to bring support for contains operator in cps-path.
contains() is a method in XPath expression. It is used when the value of any attribute changes dynamically, below are the examples,
Reference
Issues & decisions
# | Issue | Notes | Decision |
---|---|---|---|
1 | In this example, we can identify the element by using leaf-name and leaf-value. In this cps-path expression leaf-name=language and leaf-value=english. | Syntax: <cps-path> ( contains '[@leafname,' <string-value> ']' ) Examples
| |
2 | In this example, we can identify the element by using partial value of the attribute. In this cps-path expression partial value ‘en’ is used in place of english. | Syntax: <cps-path> ( contains '[@leafname,'<string-partial value> ']' ) Examples
| |
3 | In this example, we can identify the element by using text() element and its value. In this cps-path expression leaf-name=language and leaf-value=english. | Syntax: <cps-path> ( contains '[@text(),' <string-value> ']' ) Examples
|