Martin Bjorklund <[email protected]> writes:
> The text for "path" already says:
>
>   It takes as an argument a
>   string that MUST refer to a leaf or leaf-list node.

Given what the text must mean, that's sufficient for me.

Ladislav Lhotka <[email protected]> writes:
> Which of the two "foo" leaf nodes does the path argument point at? If
> the path is interpreted in the schema tree, it may appear it is the
> one inside the choice. Yes, we all know it points at the other one,
> but will all readers of the spec come to the same conclusion?

Well, in 9.9.2 it says:

   The "path" XPath expression is conceptually evaluated in the
   following context, in addition to the definition in Section 6.4.1:

   o  If the "path" statement is defined within a typedef, the context
      node is the leaf or leaf-list node in the data tree that
      references the typedef.

   o  Otherwise, the context node is the node in the data tree for which
      the "path" statement is defined.

What's really going on is that the XPath expression will always be
evaluated in the context of a particular element of a particular data
tree, but that it can be shown to be always valid by doing a "generic
evaluation" of the expression looking at the schema tree -- the schema
tree is a generic description of all possible data trees.  Of course
there are various complications because not all nodes in the schema tree
are represented in the XML tree.

In mathematics, abstracting an operation in a particular structure to a
similar operation in a "generic" structure is called "lifting", and
using that term, it's easy to notify the reader what you're doing
without spelling out the details.  What's difficult here is that it's
"obvious" what the text has to mean, but we have no simple vocabulary
for pointing that out, and the reader who is not careful might not
realize everything that is going on.

At this point, I'm willing to ignore the issue.  There doesn't seem to
be a simple way to explain the critical issue.  And if the reader
attempts to work out the details of Yang processing, he eventually has
to come to the correct conclusion; there is only one self-consistent
interpretation.

Dale

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to