Subject: Re: [netmod] yang-next

From: "Bogaert, Bart (Nokia - BE)" <[email-masked]>
Date: Thu, 12 May 2016 08:33:36 +0000

Hi,

Not sure whether this has been requested before but has it ever been considered to support higher versions of XPATH in YANG?  As far as I remember only XPATH 1.0 is supported in YANG although the RFC mentions adopting of XPATH 2.0 with respect to handling of unprefixed names.  RFC6020bis lists a set of functions that have been added and that are available in an XPATH context.  XPATH itself at this moment is at version 3.1.  Some questions:
- are there any plans to follow the XPATH evolution in YANG?
- to me at least it is not specifically clear what is and what is not supported w.r.t. XPATH in YANG.  Is there no clarification required in this context?

Certain checks can't be expressed using an XPATH and require XQUERY (e.g. when one need to follow a linked list in case of a lookup of a specific node).  Are there any plans to include support for XQUERY in YANG?

Best regards - Vriendelijke groeten,
Bart Bogaert
Broadband-Access System Architect Data
Contact number +32 3 2408310 (+32 477 673952)

NOKIA
Copernicuslaan 50, 2018 Antwerp, Belgium
Fortis 220-0002334-42
VAT BE 0404 621 642 Register of Legal Entities Antwerp

<<
This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited without the prior consent of its author.

-----Original Message-----
From: netmod [mailto:[email-masked]] On Behalf Of EXT Martin Bjorklund
Sent: 11 March 2016 11:18
To: [email-masked]
Cc: [email-masked]
Subject: Re: [netmod] yang-next

Hi,

Kent Watsen <[email-masked]> wrote:
> 
> All,
> 
> I see too many emails go by where someone has an idea that they’d like 
> to get into a future version of YANG, and keep wishing that there were 
> an easy way to capture these feature requests.  With that in mind I 
> created a new Github repository called "yang-next”.  This repository 
> is not for a draft, yet, its current existence is solely to have a 
> publicly editable issue tracker.  Please feel free to add all your 
> good ideas (just one idea per issue please) here:
> https://github.com/netmod-wg/yang-next/issues.

I think it is a good idea to capture ideas like this, but I also think that such ideas should be discussed on the ML.  But maybe that's what you meant.

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

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Thu, 12 May 2016 10:57:04 +0200

> - are there any plans to follow the XPATH evolution in YANG?

So far, XPATH 2.0 has been considered too complex to require and there
were concerns of how widespread support there is for XPATH 2.0 (and
3.0 was never mentioned I think).

> - to me at least it is not specifically clear what is and what is not supported w.r.t. XPATH in YANG.  Is there no clarification required in this context?

Can you further detail what you find missing or unclear in
draft-ietf-netmod-rfc6020bis-12.txt regarding xpath? Simply search for
xpath, there is quite some text in various places.

> Certain checks can't be expressed using an XPATH and require XQUERY (e.g. when one need to follow a linked list in case of a lookup of a specific node).  Are there any plans to include support for…

So far not.

Note that the goal so far has been to be somewhat conservative, that
is, to add features based on a good understanding which real-world
problems are being solved and ideally based on implementation and even
better early deployment experience. (A new feature that has been
implemented and successfully used as proprietary extensions is likely
more important to consider than something that exists as an idea on
paper only).

/js

-- 
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/>

---

From: "Bogaert, Bart (Nokia - BE)" <[email-masked]>
Date: Thu, 12 May 2016 09:28:25 +0000

Juergen,

Thanks for the feedback.
With respect to functions available when using XPATH: XPATH 1.0 refers to a
Core Function Library.  All the functions defined in there (Node set
functions, string functions, Boolean and number functions) are available in
a YANG XPATH context?

How wide-spread XPATH 2.0 and 3.0 is I also do not have an idea (I'm
currently "playing" with BaseX and there these versions are supported as far
as I know) but the fact that there are multiple versions of the standard can
cause confusion about what is "in" and what is "not in".  So if, for
RFC6020bis, the supported set of functions is:
1. the Core Function library of XPATH 1.0
2. the added functions listed in RFC6020bis
We could conclude that the functionality is "confined".  Maybe a statement
about full support of the Core Function Library of XPATH 1.0 in the RFC
could take away that ambiguity?

NOKIA

<<
This message (including any attachments) contains confidential information
intended for a specific individual and purpose, and is protected by law. If
you are not the intended recipient, you should delete this message. Any
disclosure, copying, or distribution of this message, or the taking of any
action based on it, is strictly prohibited without the prior consent of its
author.

-----Original Message-----
From: EXT Juergen Schoenwaelder
[mailto:[email-masked]] 
Sent: 12 May 2016 10:57
To: Bogaert, Bart (Nokia - BE)
Cc: [email-masked]
Subject: Re: [netmod] yang-next

On Thu, May 12, 2016 at 08:33:36AM +0000, Bogaert, Bart (Nokia - BE) wrote:
> Hi,
> 
> Not sure whether this has been requested before but has it ever been
considered to support higher versions of XPATH in YANG?  As far as I
remember only XPATH 1.0 is supported in YANG although the RFC mentions
adopting of XPATH 2.0 with respect to handling of unprefixed names.
RFC6020bis lists a set of functions that have been added and that are
available in an XPATH context.  XPATH itself at this moment is at version
> - are there any plans to follow the XPATH evolution in YANG?

So far, XPATH 2.0 has been considered too complex to require and there were
concerns of how widespread support there is for XPATH 2.0 (and
3.0 was never mentioned I think).

> - to me at least it is not specifically clear what is and what is not
supported w.r.t. XPATH in YANG.  Is there no clarification required in this
context?

> Certain checks can't be expressed using an XPATH and require XQUERY (e.g.
when one need to follow a linked list in case of a lookup of a specific
node).  Are there any plans to include support for XQUERY in YANG?

So far not.

Note that the goal so far has been to be somewhat conservative, that is, to
add features based on a good understanding which real-world problems are
being solved and ideally based on implementation and even better early
deployment experience. (A new feature that has been implemented and
successfully used as proprietary extensions is likely more important to
consider than something that exists as an idea on paper only).

/js

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Thu, 12 May 2016 12:10:42 +0200

> functions, string functions, Boolean and number functions) are available in

The YANG specification refers to XPath 1.0 and

https://www.w3.org/TR/1999/REC-xpath-19991116/#corelib

(section 4 Core Function Library) says

  This section describes functions that XPath implementations must
  always include in the function library that is used to evaluate
  expressions.

and hence I think a compliant implementation must support the XPath
1.0 Core Function Library.
 
> cause confusion about what is "in" and what is "not in".

As far as I understand, libxml2 does not support XPath 2.0 (or 3.0)
and having a well maintained open source XPath 2.0 implementation in C
is likely of some importance.

> So if, for

I agree that it is not explicitely stated that YANG 1.1 requires the
support of 1. and 2. (see above) but if you follow the references to
XPath 1.0, I think it is implicitely clear.

/js

---

From: Jernej Tuljak <[email-masked]>
Date: Thu, 12 May 2016 12:14:03 +0200

> functions, string functions, Boolean and number functions) are available in

Yes. All functions defined in XPATH spec [1] are available. Usage of 
some of them is discouraged, however. See Section 5.6.2 of usage 
guidelines document [2].

[1] - https://www.w3.org/TR/1999/REC-xpath-19991116/#corelib
[2] - 
https://tools.ietf.org/html/draft-ietf-netmod-rfc6087bis-06#section-5.6.2

Jernej

---

From: Martin Bjorklund <[email-masked]>
Date: Thu, 12 May 2016 12:18:08 +0200 (CEST)

Juergen Schoenwaelder <[email-masked]> wrote:
> support of 1. and 2.

See section 6.4.1 of 6020bis, where it explicitly says:

   o  The function library is the core function library defined in
      [XPATH], and the functions defined in Section 10.

/martin

> (see above) but if you follow the references to

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Thu, 12 May 2016 12:19:55 +0200

>       [XPATH], and the functions defined in Section 10.

Yes, I just found it as well. Good.

/js