You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Resources

*Note when using online xpath testers, ensure that laves are expressed as xml attributes and not like other xml elements like json-to-xml convertors will do. 

IncorrectCorrect
<categories>
	<code>01</code>
    <name>SciFi</name>
	<books>
    </books>
</categories>
<categories code=01 name='SciFi'>
	<books>
    </books>
</categories>

Queries


SlogancpsPathJiraNotesPriority / When do we need this? 
1get (list element) by xpath/bookstore/categories[@code='01']

CPS-71 - Getting issue details... STATUS

This is not really a query as code is the key attributes and this xpath is stored with the target fragmentAlready implemented
2get list element by other attribute/bookstore/categories[@name='SciFi']

CPS-231 - Getting issue details... STATUS

Compare to #1, notice how from a cpsPath perspective it is not clear which is a get and which is a query. The customer might not know either! See issue #1Required for E2E Slicing see CPS-200 study
3
//categories[@name='SciFi']

Investigate if needed for E2E Slicing. 
4
//*[@name='SciFi']



Note. All cpsPath queries can be fulfilled by just 1 REST endpoint and Java API method (as agreed earlier). We just need to document the capabilities (xpath functions) support by our cpsPath...

Updates


SloganJiraNotesPriority / When do we need this? 
1Replace DataNode(tree)

CPS-58 - Getting issue details... STATUS

This is powerful update method that can fulfill all below scenarios too. However it is a crude and inefficient for scenario with children.  
Ada a child at the top of the tree will required the client to re-submit all existing data of the siblings and their descendants. replacing all of them in the DB layer which of course could lead to very lengthy update operations.
Already being implemented.
Need to investigate if E2E Slicing requires the 'with descendants' option
2Update Single attribute on single DataNode

Probably required for E2E Slicing
3Update Multiple attributes on single DataNode
This could a simple extension of the previous method (#2) by instead of providing one key-value pair it could be  map of many. Question remains if we ant to Java-API methods, or one. And if just it could be handled by one user story instead, depending on team preference
4Add Child DataNode 

Investigate if needed for E2E Slicing. 
But seems likely this is needed soon and to address the technical debt of the solution in #1
5Add DataNode to List

Investigate if needed for E2E Slicing. 
But seems likely this is needed soon and to address the technical debt of the solution in #1
6Remove DataNode
Assume this will also cover removing DataNode from a listInvestigate if needed for E2E Slicing. 
But seems likely this is needed soon and to address the technical debt of the solution in #1
7Add element to Leaf-List

Nice-to-have. From experience in similar project this use-case never was prioritized.  It can always be done using #3 or #4 instead.
My recommendation  is to not consider this until a client specially requests it and argues the need for it.
8Remove Element from Leaf-List

Nice-to-have. From experience in similar project this use-case never was prioritized.  It can always be done using #3 or #4 instead.
My recommendation  is to not consider this until a client specially requests it and argues the need for it.




  • No labels