On 08/23/2016 12:08 AM, Alex Campbell wrote:
The intention in this case is obviously to evaluate the 'must' statement if
the container contains any values; what would break if we said that
A non-presence container exists in the data tree if and only if it has
any children which exist in the data tree.
thus disallowing the existence of empty NP-containers in the data tree?
The question is where is the misunderstanding.
"If a node that exists in the accessible tree has a non-presence
container as a child, then the non-presence container also exists in
the tree."
What does this mean? I believe there is confusion based on "the tree"
refering not to the data tree but the Xpath context. At least I hoped
until I realized the text was introduced as a solution to Y41
'clarification of "must" in NP-container'. That definitely means it
addresses the must statements in the non-presence containers and it
means "the tree" as in the data tree.
1. If "then the non-presence container also exists in the tree." is
refering to the Xpath context and not the data tree (which is not
obvious since nowhere is the Xpath context introduced as "the tree")
then the Xpath validation statements in the non-presence container do
not have to be evaluated. The only effect is that other Xpath
expressions testing for the existence of the non-presence container will
return true.
2. If the meaning is that the non-presence container exists virtually in
the data tree and its pertaining Xpath expressions have to be evaluated
then there is a problem. Then it is not only that many unnecessary Xpath
evaluations will be processed but also designers have to make sure their
Xpath expressions do not fail when the non-presence container is not
even created (it is not a problem if the user attempts to create it
empty then at least there is some bad initiative from him asking for
error message). Like in the example there will be 95 errors for all
containers not part of the interface named "me0". There can never be a
valid configuration for YANG 1.1 for this example. If the must statement
is modified from must "../name = 'me0'" to "../name='me0' or not
(./address)" then it will work as intended in YANG 1.0 with the overhead
of 95 unnecessary evaluations.
If the text you propose is added without the current text removed it
will be even more difficult to understand the clarification.
Vladimir
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod