Re: [netmod] regular expression flavours (again)

Ladislav Lhotka <lhotka@nic.cz> Wed, 12 June 2019 09:39 UTC

Return-Path: <lhotka@nic.cz>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2DFD61201CF for <netmod@ietfa.amsl.com>; Wed, 12 Jun 2019 02:39:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.998
X-Spam-Level:
X-Spam-Status: No, score=-6.998 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kIgczI87FBMi for <netmod@ietfa.amsl.com>; Wed, 12 Jun 2019 02:39:40 -0700 (PDT)
Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5457312013A for <netmod@ietf.org>; Wed, 12 Jun 2019 02:39:40 -0700 (PDT)
Received: from birdie (unknown [IPv6:2001:718:1a02:1::380]) by mail.nic.cz (Postfix) with ESMTPSA id 5E255140722; Wed, 12 Jun 2019 11:39:37 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1560332377; bh=ejYUT53Qjfb85akol9usCUoXr17EY05QPJWOCT/PEyo=; h=From:To:Date; b=PbScaWSYSDGBAGtwhNRAmmKsWagxzWqO1R6zb4Cjb5oE9db9kfJnWPCqTXSImbKeP tbwHEHjGQFKZ2X17hGH0IdcM6/fhUSpvBZpTqgM5GRp4L0nUjNKmI8qbuCc6s9aPFn /Ajz2OYL69x1jAoRU2Cmu5X9VIeJc++8EVNUvtx8=
Message-ID: <d11c243ec323610a3179d06fe9b594c9b4d548d8.camel@nic.cz>
From: Ladislav Lhotka <lhotka@nic.cz>
To: "Rob Wilton (rwilton)" <rwilton@cisco.com>, NETMOD WG <netmod@ietf.org>
Date: Wed, 12 Jun 2019 11:39:37 +0200
In-Reply-To: <BYAPR11MB26316E09A62C11012CAFDA15B5EC0@BYAPR11MB2631.namprd11.prod.outlook.com>
References: <291106e34498ebd68f26bf9ff9b679dd5bd8f0cd.camel@nic.cz> <BYAPR11MB26316E09A62C11012CAFDA15B5EC0@BYAPR11MB2631.namprd11.prod.outlook.com>
Organization: CZ.NIC
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.32.2
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: clamav-milter 0.100.3 at mail.nic.cz
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/nS5FGPE2rp5DCuureO0y2-qXyCw>
Subject: Re: [netmod] regular expression flavours (again)
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 12 Jun 2019 09:39:50 -0000

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";

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

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

Lada

> 
> Thanks,
> Rob
> 
> 
> > -----Original Message-----
> > From: netmod <netmod-bounces@ietf.org> On Behalf Of Ladislav Lhotka
> > Sent: 12 June 2019 09:02
> > To: NETMOD WG <netmod@ietf.org>
> > 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
> > netmod@ietf.org
> > https://www.ietf.org/mailman/listinfo/netmod
-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67