Re: [netmod] default namespace in XPath
Ladislav Lhotka <lhotka@nic.cz> Wed, 07 March 2018 13:30 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 8BC9C12D954 for <netmod@ietfa.amsl.com>; Wed, 7 Mar 2018 05:30:56 -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 OijtW_z7NH81 for <netmod@ietfa.amsl.com>; Wed, 7 Mar 2018 05:30:54 -0800 (PST)
Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (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 5D02B120713 for <netmod@ietf.org>; Wed, 7 Mar 2018 05:30:52 -0800 (PST)
Received: from birdie (unknown [IPv6:2001:718:1a02:1::380]) by mail.nic.cz (Postfix) with ESMTPSA id BC77C608AF; Wed, 7 Mar 2018 14:30:50 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1520429450; bh=eKOWo9lZaluCvd/muahOSt9EfvJ+SW9ppL+k2rWZ7iI=; h=From:To:Date; b=V9Nme+pGSp6YR+1E8cViX/06pxTva44M5iNrOTiXhF7ZM6XdnkXdHhoiD4x9+v7kZ gnKhoovpF1XpjeAzwcfHTENI3WSBc1YowHJq8CXP/h3OOfztc8kek8LJaNXj5uCz7v TulMj+8/RXfFoZHQppddnyaJk4cX9wRZnTT9SyRI=
Message-ID: <1520429450.8319.52.camel@nic.cz>
From: Ladislav Lhotka <lhotka@nic.cz>
To: Martin Bjorklund <mbj@tail-f.com>
Cc: netmod@ietf.org
Date: Wed, 07 Mar 2018 14:30:50 +0100
In-Reply-To: <20180307.140620.956119706648700590.mbj@tail-f.com>
References: <1520413892.8319.9.camel@nic.cz> <20180307.140620.956119706648700590.mbj@tail-f.com>
Organization: CZ.NIC
Content-Type: text/plain; charset="UTF-8"
X-Mailer: Evolution 3.26.5
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: clamav-milter 0.99.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/yJ-BahywrJud_dBnh6UwAqLJ9-s>
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 13:31:06 -0000
On Wed, 2018-03-07 at 14:06 +0100, Martin Bjorklund wrote: > 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)? > > Just like with all other unprefixed items (except in a > grouping/typedef), it is supposed to default to the prefix of the > module where it is defined (lexical scope). So it is supposed to be > "example-4-b". I agree that the term "current node" is misleading. But then you cannot refer to XPath 2.0 as being the model for this default namespace concept because in-scope namespaces defined in XPath 2.0 are bound to element (XPath) nodes. Lada > > > > > /martin -- Ladislav Lhotka Head, CZ.NIC Labs PGP Key ID: 0xB8F92B08A9F76C67
- [netmod] default namespace in XPath Ladislav Lhotka
- Re: [netmod] ?==?utf-8?q? default namespace in XP… Michal Vaško
- Re: [netmod] default namespace in XPath Ladislav Lhotka
- Re: [netmod] default namespace in XPath Martin Bjorklund
- Re: [netmod] default namespace in XPath Ladislav Lhotka