Re: [netmod] default namespace in XPath

Ladislav Lhotka <lhotka@nic.cz> Wed, 07 March 2018 11:34 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 2661F129C6C for <netmod@ietfa.amsl.com>; Wed, 7 Mar 2018 03:34:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.009
X-Spam-Level:
X-Spam-Status: No, score=-7.009 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, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=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 KLwbuoQ5JojU for <netmod@ietfa.amsl.com>; Wed, 7 Mar 2018 03:34:15 -0800 (PST)
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 EB9BC126CE8 for <netmod@ietf.org>; Wed, 7 Mar 2018 03:34:14 -0800 (PST)
Received: from birdie (unknown [IPv6:2001:718:1a02:1::380]) by mail.nic.cz (Postfix) with ESMTPSA id 18EEC62506; Wed, 7 Mar 2018 12:34:13 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1520422453; bh=nrcvddXfAqKMnbLSLdYjxt2HGavIyUXftfWhw+xcppg=; h=From:To:Date; b=ZwlNT3/JSAHZSR9bk26QAswoqdXS6t32gjmSGomn5Cy8lqO2qUJXH54xOnVcn/8FM waAnKYHLjETXyKh/Zvjsd17fs0uDvDDBpU9Esr4MdE24AG5/rA3NekRCRk9UK7Q05a c1DmLqTKgKkzzvIMliPi5LisVQeHJszobnWsN/dI=
Message-ID: <1520422452.8319.17.camel@nic.cz>
From: Ladislav Lhotka <lhotka@nic.cz>
To: Michal Vaško <mvasko@cesnet.cz>
Cc: NETMOD WG <netmod@ietf.org>
Date: Wed, 07 Mar 2018 12:34:12 +0100
In-Reply-To: <3fcd-5a9fae80-9f-740b6f80@66506381>
References: <3fcd-5a9fae80-9f-740b6f80@66506381>
Organization: CZ.NIC
Content-Type: text/plain; charset="UTF-8"
X-Mailer: Evolution 3.26.5
Mime-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: clamav-milter 0.99.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/j0qo0hSdwtFZaPuxqzENTXLLb0g>
Subject: Re: [netmod] default namespace in XPath
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
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, 07 Mar 2018 11:34:17 -0000

Hi Michal,

On Wed, 2018-03-07 at 10:18 +0100, Michal Vaško wrote:
> Hello,
> we have implemented it as option 1 based on the "current()" function 

Right, I have the same in my implementation. It is however counter-intuitive in
cases like my example because unprefixed names normally receive the namespace of
the module where they appear (I made a mistake myself:-).

> definition (RFC 7950 sec. 10.1.1):
> 
> The current() function takes no input parameters and returns a node
>    set with the initial context node as its only member.
> 
> If this was not intended and actually option 2 is correct, the "current()"
> function should probably be renamed or return a different node to be
> consistent and not misleading.

IMO the current() function should stay, but the text in sec. 6.4.1 has to be
changed:

OLD
  Names without a namespace prefix belong to the same namespace as
  the identifier of the current node.

NEW
  Names without a namespace prefix belong to the same namespace as
  the identifier of the context node.

If there are no objections, I will file an erratum.

Lada

> 
> Regards,
> Michal
> 
> On Wednesday, March 7, 2018 10:11 CET, Ladislav Lhotka <lhotka@nic.cz> wrote: 
>  
> > Hi,
> > 
> > sec. 6.4.1 in RFC 7950 says in the second bullet item:
> > 
> >     Names without a namespace prefix belong to the same namespace as
> >     the identifier of the current node.
> > 
> > It is unclear what "current node" means:
> > 
> > 1. Is it the context node of the XPath expression, or
> > 
> > 2. is it the schema node corresponding to the parent statement of the
> > must/when
> > statement?
> > 
> > For example:
> > 
> > module example-4-a {
> >   ...
> >   container bag {
> >     ...
> >   }
> > }
> > 
> > module example-4-b {
> >   ...
> >   import example-4-a {
> >     prefix "ex4a";
> >   }
> > 
> >   augment "/ex4a:bag" {
> >     when "/quux = 0";
> >     ...
> >     }
> >   }
> >   ...
> > }
> > 
> > What is the namespace of "quux" in the when expression? Is it "example-4-a"
> > (option 1 above) or "example-4-b" (option 2)?
> > 
> > Thanks, 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