...
Example:
Code Block | ||
---|---|---|
| ||
/* XML XPath: */ /ns1:parentType[@attr1='value1']/ns2:childType[@attr2='value2'] /* CPS XPath for internal use (storage): */ /org:onap:sample:parentType(2020-01-01)[@attr1='value1']/org:onap:sample:childType(2020-02-02)[@attr2='value2'] |
...
It also should be taken into account the full type hierarchy matters if data is stored by fragments and the XPath property is being used as a
model revision identifier as well. If parent model is changed while child model remains the same (revision) the child data fragment will also
differ depending on context. It makes a requirement the fully qualified type definitions should be stored with data fragments (XPath)
Code Block | ||
---|---|---|
| ||
/* clear parent context difference: */ /org:onap:sample:parentType(2020-01-01)[@attr1='value1']/org:onap:sample:childType(2020-02-02)[@attr2='value2'] /org:onap:sample:parentType(2020-02-02)[@attr1='value1']/org:onap:sample:childType(2020-02-02)[@attr2='value2'] /* unclear parent context (if only current node type is stored in database): */ /parentType[@attr1='value1']/childType[@attr2='value2'] |
...