[netmod] XPath node type tests

Robert Wilton <rwilton@cisco.com> Fri, 20 October 2017 10:13 UTC

Return-Path: <rwilton@cisco.com>
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 1511B133023 for <netmod@ietfa.amsl.com>; Fri, 20 Oct 2017 03:13:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -13.101
X-Spam-Level:
X-Spam-Status: No, score=-13.101 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com
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 Z499evipuKzN for <netmod@ietfa.amsl.com>; Fri, 20 Oct 2017 03:13:35 -0700 (PDT)
Received: from aer-iport-3.cisco.com (aer-iport-3.cisco.com [173.38.203.53]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2254E1321DF for <netmod@ietf.org>; Fri, 20 Oct 2017 03:13:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=526; q=dns/txt; s=iport; t=1508494415; x=1509704015; h=to:from:subject:message-id:date:mime-version: content-transfer-encoding; bh=qmS4eg8GlOv/eiGV0/LbeLPHxIUgmrYhKCJ5dNT/pkM=; b=I8GDbIGuNKgu1OCYsyErLMSE6uVBSwkmx1ya35i3wKsJXFoPRxHaNpql f6Vxd/BndzKryDgxXLPVP34Gwz11dJS9yoCf0rREU8/1xjcmha+8ukyyM /Vgw0jgALpj/Ok3R9x5MiXcYdwEHbvMUVip64guWM/ejGYYk3GXDe6dzT Q=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DCAAD6yulZ/xbLJq1cGgEBAQECAQEBA?= =?us-ascii?q?QgBAQEBhTGEIYofdKZ6ghEKijoYAQIBAQEBAQEBax0LhUcPAQV2AiYCXw0IAQG?= =?us-ascii?q?KHKlvgieLIAELJoEPgh+DV4ISixqCYQWhXJRxgXyJbYczjhSHYoE5HzhCgRk0I?= =?us-ascii?q?QgdFYMuhF8/iw4BAQE?=
X-IronPort-AV: E=Sophos;i="5.43,405,1503360000"; d="scan'208";a="656465212"
Received: from aer-iport-nat.cisco.com (HELO aer-core-2.cisco.com) ([173.38.203.22]) by aer-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Oct 2017 10:13:33 +0000
Received: from [10.63.23.135] (dhcp-ensft1-uk-vla370-10-63-23-135.cisco.com [10.63.23.135]) by aer-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id v9KADX2S002763 for <netmod@ietf.org>; Fri, 20 Oct 2017 10:13:33 GMT
To: "netmod@ietf.org" <netmod@ietf.org>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <aba8fca4-4cc7-ee66-6adf-baac5485b12a@cisco.com>
Date: Fri, 20 Oct 2017 11:13:33 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/HSZGcYBvSApIxp8OwCqIYpjXPIM>
Subject: [netmod] XPath node type tests
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: Fri, 20 Oct 2017 10:13:37 -0000

Hi,

XPATH 1.0 defines the following three node-type tests:

1) comment()
2) processing-instruction(<opt arg>)
3) text()

My assumption is that a YANG tree doesn't contain any nodes of type 
'comment' or 'processing-instruction' and hence these filters would 
never match any nodes.

However, it wasn't clear to me from reading 7950 or rfc6087bis-14 
whether text() matches anything.  In particular, does a YANG leaf node 
(except of type empty) always parent a text node that holds its value?

Thanks,
Rob