Subject: [netmod] xpath in augment

From: Martin Bjorklund <[email-masked]>
Date: Tue, 30 Jun 2009 22:31:23 +0200 (CEST)

Hi,

I realized that we are using the augment-style XPath in other
statements: deviation has an absolute expression just like top-level
augment, and unique and refine has a descendant expression just like
uses-augment.

[BTW, There's a bug in the grammar for 'augment-arg', it should be:
augment-arg         = absolute-schema-nodeid]

So I'm thinking it might be easiest to explain this NOT in terms of
XPath, but simply define the rules for a schema node identifier.  Then
all XPath evaluations in YANG work on the data tree only, which makes
things simpler.

Something like this:

* Schema node identifier

A schema node identifier is a string that identifies a node in the
schema tree.  It has two forms, "absolute" and "descendant", defined
by the rules "absolute-schema-nodeid" and "descendant-schema-nodeid"
in ^grammar^, respectively.  A schema node identifier consists of a
path of identifiers, separated by slashes ("/").  In an absolute
schema node identifier, the first identifier after the leading slash
is any top-level schema node in local module or all imported modules.

References to identifiers defined in external modules MUST be
qualified with appropriate prefixes, and references to identifiers
defined in the current module and its submodules MAY use a prefix.

For example, to identify the child node "b" of top-level node "a", the
string "/a/b" can be used.

And then we just refer to this section for the statements above, and
get rid of the XPath issues for augment.

Comments?

/martin

---

From: WashamFan <[email-masked]>
Date: Wed, 01 Jul 2009 10:15:21 +0800

I agree. 
Node identifier would be used to identify a schema node which
should be target node argument of those stmts like augment.
XPath would be used to express conditions which should be
arguments of those stmts like when/must.

washam

----- Original Message -----
From: Martin Bjorklund <[email-masked]>
Date: Wednesday, July 1, 2009 4:32 am
Subject: [netmod] xpath in augment
To: [email-masked]

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