Subject: [netmod] Why not use xpath3.0 or xpath2.0?

From: "fengchong (C)" <[email-masked]>
Date: Tue, 2 Feb 2016 00:32:47 +0000

Hi all,
I notice draft-ietf-netmod-rfc6020bis-09 still uses xpath1.0 as a notation for checking node references or dependencies.
I don’t know why we don’t use xpath3.0 or xpath2.0? xpath3.0 is more powerful than xpath1.0.
For example, xpath3.0 introduced conditional expression. It’s very useful for must statement.

If we have a schema tree like this:
List l {
  Key a;
  Leaf a {…}
  Leaf b {…}
  Leaf c {…}
  Leaf d {…}
}

If a= 5 and b=10 and c >20, then d must be less than 30 and greater than 15.
If use xpath1.0, the MUST statement should be:
Must “a != 5
 or b != 10
or c <=20
or  (a =5 and b = 10 and c>20 and d >15 and d < 30)”
if use xpath3.0:
must “if (a =5 and b = 10 and c>20)
then d>15 and d<30
else true()”

  if we feel xpath3.0 is too complicated, we can specify a small set of xpath grammar for YANG.

________________________________
冯冲
华为技术有限公司 Huawei Technologies Co., Ltd.
[Company_logo]

Phone:
Fax:
Mobile: 18519117316
Email: [email-masked]
地址：南京市软件大道101号华为南京基地 邮编：210001
Huawei Technologies Co., Ltd.

http://www.huawei.com
________________________________
本邮件及其附件含有华为公司的保密信息，仅限于发送给上面地址中列出的个人或群组。禁
止任何其他人以任何形式使用（包括但不限于全部或部分地泄露、复制、或散发）本邮件中
的信息。如果您错收了本邮件，请您立即电话或邮件通知发件人并删除本邮件！
This e-mail and its attachments contain confidential information from HUAWEI, which
is intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 2 Feb 2016 09:35:53 +0100

Moving from xpath 1.0 to a newer version of xpath impacts certain
implementations in non-trivial ways. Note that the WG charter says:

  The NETMOD Working Group will produce a maintenance release of the
  core YANG specification called YANG 1.1, that is a revision of RFC
  6020. The changes to RFC 6020 are restricted in the following ways:

  - All compliant YANG 1.0 modules must be accepted as compliant YANG
    1.1 modules.

  - All known ambiguities of YANG 1.0 and all reported defects and
    errata will be addressed.

  - YANG 1.1 is not adding fundamentally new data modeling concepts to
    the language.

  - The changes of the specification will be kept to the minimum
    necessary to achieve the previously stated goals.

Moving to a more powerful version of xpath is out of scope for YANG
1.1. Note that we are wrapping things up, the deadline for submitting
feature requests has long passed.

/js

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

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>