Hi Lada,

> -----Original Message-----
> From: Ladislav Lhotka <[email protected]>
> Sent: 12 June 2019 10:40
> To: Rob Wilton (rwilton) <[email protected]>; NETMOD WG <[email protected]>
> Subject: Re: [netmod] regular expression flavours (again)
> 
> Hi Rob,
> 
> On Wed, 2019-06-12 at 09:25 +0000, Rob Wilton (rwilton) wrote:
> > Hi Lada,
> >
> > OpenConfig have already introduced a module level extension statement
> > to indicate that their pattern statements use POSIX regular expressions.
> 
> What I meant was rather something like
> 
>     pattern-language "POSIX";
> 

But depending on how many pattern languages are supported, wouldn’t that make 
implementing YANG a lot harder, since implementations would need to support all 
the allowed pattern languages?

Also, IIRC, POSIX regex doesn't support unicode, which means that it isn't 
necessarily a good choice for a language that does support unicode strings by 
default.


> with the default being "XSD". It could possibly also include your proposal
> of XSD regex subset (issue #21).

Really my aim was the other way around.  I.e. have all YANG pattern statements 
in just one simple regex language that could trivially be converted to run on 
any common regex engine.


> 
> This could in fact be a good candidate for a critical extension.
> 
> >
> >   extension regexp-posix {
> >      description
> >       "This extension indicates that the regular expressions included
> >       within the YANG module specified are conformant with the POSIX
> >       regular expression format rather than the W3C standard that is
> >       specified by RFC6020 and RFC7950.";
> >   }
> >
> > Defined in
> > https://github.com/openconfig/public/blob/master/release/models/openco
> > nfig-extensions.yang
> >
> > I don't think that this should become part of the YANG standard.
> 
> I suspect that developers of YANG tools are being pushed by users to
> include support for this anyway, so I don't see much benefit from blocking
> it.

I don't see this as blocking it at all, but rather that a pragmatic common 
solution already exists without requiring any standardization work.

Thanks,
Rob


> 
> Lada
> 
> >
> > Thanks,
> > Rob
> >
> >
> > > -----Original Message-----
> > > From: netmod <[email protected]> On Behalf Of Ladislav Lhotka
> > > Sent: 12 June 2019 09:02
> > > To: NETMOD WG <[email protected]>
> > > Subject: [netmod] regular expression flavours (again)
> > >
> > > Hi,
> > >
> > > I think it is very unfortunate that OpenConfig folks use POSIX
> > > regular expressions instead of XSD. This of course causes confusion,
> > > see e.g. this
> > > PR:
> > >
> > > https://github.com/CZ-NIC/yangson/pull/22
> > >
> > > Given the popularity of OpenConfig models, it seems to me that it
> > > would be better if YANG somehow accomodates such (largely cosmetic)
> differences.
> > >
> > > One option would be that each YANG module declares the regex flavour
> > > used in its patterns. Yes, it is a complication, but having separate
> > > forks of YANG is much worse.
> > >
> > > ISO Schematron adopted a similar approach with "query language
> binding"
> > > that can be declared with the schema element, for example
> > >
> > > <schema xmlns="http://purl.oclc.org/dsdl/schematron";
> > > queryBinding="exslt">
> > >
> > > Any thoughts on this?
> > >
> > > Lada
> > >
> > > --
> > > Ladislav Lhotka
> > > Head, CZ.NIC Labs
> > > PGP Key ID: 0xB8F92B08A9F76C67
> > >
> > > _______________________________________________
> > > netmod mailing list
> > > [email protected]
> > > https://www.ietf.org/mailman/listinfo/netmod
> --
> Ladislav Lhotka
> Head, CZ.NIC Labs
> PGP Key ID: 0xB8F92B08A9F76C67

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

Reply via email to