Subject: [netmod] Y18: fix "when" expression context problem

From: Martin Bjorklund <[email-masked]>
Date: Wed, 21 Jan 2015 13:24:33 +0100 (CET)

Hi,

I had an action point to clarify the evaluation order of when
expressions, in Y18.

I have updated Y18 with this proposal, in 7.19.5:

  OLD:

  The result of the XPath expression is converted to a boolean value
  using the standard XPath rules.

  NEW:

  The result of the XPath expression is converted to a boolean value
  using the standard XPath rules.

  If the XPath expression references any node that also has associated
  "when" statements, these "when" expressions MUST be evaluated first.
  There MUST NOT be any circular dependencies in these "when"
  expressions.

/martin

---

From: Ladislav Lhotka <[email-masked]>
Date: Wed, 21 Jan 2015 14:28:17 +0100

>   There MUST NOT be any circular dependencies in these "when"

I think this sufficiently specifies the order of evaluations.

I am now looking at the last bullet in sec. 7.9.15. The old (6020) text
worked for the case when the node instance was present in the data tree,
while the new text proposed in Y18 seems to cover the situation when the
context node is missing. Maybe these two should be combined?

  NEW:

   o  If the "when" statement is a child of any other data definition
      statement, the context node is the node in the accessible tree for
      which the "when" statement is defined. If no such node exists, it
      is tentatively created with no value and no children.

Hmm, but what is the context node when *multiple* instances exist? This
could happen if the when statement is on a list or leaf-list node.

Lada

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

-- 
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C