summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorputhuparambil.aditya <aditya.puthuparambil@bell.ca>2021-04-23 11:55:24 +0100
committerputhuparambil.aditya <aditya.puthuparambil@bell.ca>2021-04-23 11:55:24 +0100
commitff71462728d8eb63d36ad4c3ede24f10ea030c14 (patch)
tree216efcd40d73a23b184487a6860e1540fb845309 /docs
parentefe679def187d07560601a3ff3beb719755b3d7a (diff)
Documents update for multiple attributes support in Get Descendent API
Issue-ID: CPS-309 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: I413fd64b12b1c1a10fd9e0068809cb5a8a6e28ad
Diffstat (limited to 'docs')
-rw-r--r--docs/cps-path.rst22
1 files changed, 20 insertions, 2 deletions
diff --git a/docs/cps-path.rst b/docs/cps-path.rst
index 451c24f394..91bfdcb431 100644
--- a/docs/cps-path.rst
+++ b/docs/cps-path.rst
@@ -57,7 +57,7 @@ Supported Functions
Get List Elements by Any Attribute Value
----------------------------------------
-**Syntax**: ``<xpath>/<target-node>/[@<leaf-name>=<leaf-value>]``
+**Syntax**: ``<xpath>/<target-node>[@<leaf-name>=<leaf-value>]``
- ``xpath``: The xpath to the parent of the target node including all ancestors.
- ``target-node``: The name of the (list) node which elements will queried.
- ``leaf-name``: The name of the leaf which value needs to be compared.
@@ -74,7 +74,7 @@ Get List Elements by Any Attribute Value
- Only string and integer values are supported (boolean and float values are not supported).
**Notes**
- - For performance reasons it does not make sense to query the list key leaf. If the key value is known it is beter to execute a get request with the complete xpath.
+ - For performance reasons it does not make sense to query the list key leaf. If the key value is known it is better to execute a get request with the complete xpath.
Get Any Descendant
------------------
@@ -91,3 +91,21 @@ Get Any Descendant
**Limitations**
- List elements can only be addressed using the list key leaf.
+
+Get Any Descendant by Any Attribute Value
+------------------------------------------
+
+**Syntax**: ``//<direct-ancestors><target-node>[@<leaf-name>=<leaf-value>]``
+ - ``direct-ancestors``: Optional path to direct ancestors of the target node. This can contain zero to many ancestor nodes separated by a /.
+ - ``target-node``: The name of the (list) node which elements will queried.
+ - ``leaf-name``: The name of the leaf which value needs to be compared.
+ - ``leaf-value``: The required value of the leaf.
+
+**Examples**
+ - ``//categories[@name='Kids']``
+ - ``//categories[@name='Kids' and @numberOfBooks=1]``
+
+**Limitations**
+ - Only string and integer values are supported (boolean and float values are not supported).
+ - Multiple attributes should be separated by 'and'.
+ - Trailing 'and' is ignored in the yang list. \ No newline at end of file