diff options
author | niamhcore <niamh.core@est.tech> | 2021-05-05 11:42:20 +0100 |
---|---|---|
committer | Niamh Core <niamh.core@est.tech> | 2021-05-06 14:11:01 +0000 |
commit | 4395c1fad0b92f0f7084ca9d70e6e26f61007513 (patch) | |
tree | 82d202c343bed2056449b752e24c505261c40d25 | |
parent | 10f834104ead71661cff6823a79b9346169b79e1 (diff) |
Document ancestor cps path
Issue-ID: CPS-305
Signed-off-by: niamhcore <niamh.core@est.tech>
Change-Id: I29ef0c62ab2030d900c9fcecb453d9aff9f647d3
-rw-r--r-- | docs/cps-path.rst | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/docs/cps-path.rst b/docs/cps-path.rst index 160aa9389c..aec87cd436 100644 --- a/docs/cps-path.rst +++ b/docs/cps-path.rst @@ -51,8 +51,8 @@ General Notes - String values must be wrapped in quotation marks (U+0022) or apostrophes (U+0027). - String comparisons are case sensitive. -Supported Functions -=================== +Supported Queries +================= Get List Elements by Any Attribute Value ---------------------------------------- @@ -107,4 +107,25 @@ Get Any Descendant by Any Attribute Value **Limitations** - Only string and integer values are supported (boolean and float values are not supported). - - Multiple attributes can only be combined using 'and'. 'or' and bracketing is not supported.
\ No newline at end of file + - Multiple attributes can only be combined using 'and'. 'or' and bracketing is not supported. + +Query Extensions +================ + +Ancestor Axis +------------- + +The ancestor axis can be added to any CPS path query. + +**Syntax**: ``//<cps-path>/ancestor::<ancestor-path>`` + - ``cps-path``: Any CPS path query. + - ``ancestor-path``: Partial path to ancestors of the target node. This can contain one or more ancestor nodes separated by a /. + +**Examples** + - ``//book/ancestor::categories`` + - ``//categories[@genre="SciFi"]/book/ancestor::bookstore`` + - ``book/ancestor::categories[@code=1]/books`` + +**Limitations** + - Ancestor list elements can only be addressed using the list key leaf. + - List elements with compound keys are not supported.
\ No newline at end of file |