Re: [yang-doctors] CODE BEGINS to mentions that CODE BEGINS is not used

Kent Watsen <kwatsen@juniper.net> Sun, 18 March 2018 08:32 UTC

Return-Path: <kwatsen@juniper.net>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2706712702E for <yang-doctors@ietfa.amsl.com>; Sun, 18 Mar 2018 01:32:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=juniper.net
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 zpnrGhqUwzsr for <yang-doctors@ietfa.amsl.com>; Sun, 18 Mar 2018 01:32:38 -0700 (PDT)
Received: from mx0b-00273201.pphosted.com (mx0b-00273201.pphosted.com [67.231.152.164]) (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 C67331243F6 for <yang-doctors@ietf.org>; Sun, 18 Mar 2018 01:32:38 -0700 (PDT)
Received: from pps.filterd (m0108162.ppops.net [127.0.0.1]) by mx0b-00273201.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2I8VrYJ002299; Sun, 18 Mar 2018 01:32:37 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=PPS1017; bh=nYnab+nPwGS15vzXCNDTul2DbfDP87EUkBQzUI7C9Bs=; b=Plv7lWAPHjrXYzogp79meLsrpTIsiRIZjdb7mah1k+0kBsqsEr2mFPObA6ecSSj3HzWt Z9YaSlKUmMS4WNTGqIGuziOcTDmTxoPfYzdyuzHRjUUF+C+oijPajF9lWuco/lV97EKo GnE9tZiG+cBkSzkaXLHO+fYRRON/poykSv9tqAWp7nnxvZvIfYYOiTfFnuIAvQ2GFJRm eBJ18CXH3DcUp9RWYjJM47feReT9iIgFA5zHjySXbfYjKzqye616WSLGFrpOOxKQvobG MLtPawAF/I5BhaxhaDfg59jVjDpz3j09SFbGbjEpgHBMXMyO/aAhcYskn5edJnFvxBLO FQ==
Received: from nam01-by2-obe.outbound.protection.outlook.com (mail-by2nam01lp0182.outbound.protection.outlook.com [216.32.181.182]) by mx0b-00273201.pphosted.com with ESMTP id 2gs198rwru-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 18 Mar 2018 01:32:37 -0700
Received: from DM5PR05MB3484.namprd05.prod.outlook.com (10.174.240.147) by DM5PR05MB3340.namprd05.prod.outlook.com (10.174.191.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.609.6; Sun, 18 Mar 2018 08:32:34 +0000
Received: from DM5PR05MB3484.namprd05.prod.outlook.com ([fe80::d13e:bdcf:3798:c34f]) by DM5PR05MB3484.namprd05.prod.outlook.com ([fe80::d13e:bdcf:3798:c34f%2]) with mapi id 15.20.0609.007; Sun, 18 Mar 2018 08:32:34 +0000
From: Kent Watsen <kwatsen@juniper.net>
To: Benoit Claise <bclaise@cisco.com>
CC: YANG Doctors <yang-doctors@ietf.org>, "Joe Clarke (jclarke)" <jclarke@cisco.com>
Thread-Topic: [yang-doctors] CODE BEGINS to mentions that CODE BEGINS is not used
Thread-Index: AQHTvh6O/hAf/GasW0iU3oBm7h6c5aPVqxe/
Date: Sun, 18 Mar 2018 08:32:34 +0000
Message-ID: <4699CEF0-F355-4304-B97B-30EECB5F1A78@juniper.net>
References: <25363b8e-2d4c-6ec4-404d-1d6961cfaa00@cisco.com>
In-Reply-To: <25363b8e-2d4c-6ec4-404d-1d6961cfaa00@cisco.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [31.133.146.188]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; DM5PR05MB3340; 7:ZLPSpVbUjZjHNhcuyK5VJA9Ulu6oO8J7XscGIisEqqIv++UPzsvQLkwFWeBhh2SsfCV85Pi28lXA57Rl7rM+foUndZmEeEL3i+dQCh+2b7mPdrmoKHXiYwmQWVdcOvZVTGVCXuHoca3c+TxZWZgR6hXYQmT5OBM8TMgv2Z68YTNWxjbv5refQkXGeq2WElUjWlE6GANfjnHo78y6ONEVNmvO8PheTyw862LfCoLK8koHP8I/cerWU2gC0BHrKEYd
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: 16333b4e-7656-4d66-1bb2-08d58caaccb0
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DM5PR05MB3340;
x-ms-traffictypediagnostic: DM5PR05MB3340:
x-microsoft-antispam-prvs: <DM5PR05MB33406D732F8C6364A9421DB3A5D50@DM5PR05MB3340.namprd05.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(10436049006162)(95692535739014);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231221)(944501300)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:DM5PR05MB3340; BCL:0; PCL:0; RULEID:; SRVR:DM5PR05MB3340;
x-forefront-prvs: 06157D541C
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(39860400002)(39380400002)(396003)(366004)(376002)(189003)(199004)(69234005)(33656002)(3846002)(53386004)(2906002)(82746002)(6436002)(6246003)(106356001)(2900100001)(86362001)(575784001)(66066001)(53936002)(236005)(6306002)(54896002)(6512007)(1680700002)(83716003)(5660300001)(6486002)(6116002)(229853002)(7736002)(5250100002)(478600001)(14454004)(68736007)(966005)(36756003)(6916009)(2950100002)(3280700002)(25786009)(99286004)(606006)(76176011)(59450400001)(6346003)(26005)(186003)(53546011)(6506007)(102836004)(8936002)(105586002)(81166006)(81156014)(316002)(97736004)(8676002)(4001150100001)(4326008)(54906003)(3660700001)(5003630100001)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR05MB3340; H:DM5PR05MB3484.namprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en;
received-spf: None (protection.outlook.com: juniper.net does not designate permitted sender hosts)
x-microsoft-antispam-message-info: vjx2q8A8ZMb/ZapGxCYrkpEfJah5HCxjCH3wt/jzsPlxtYi7CsuYCNaZwlt4wM8PSvBNJq3Hp4GByIbpTgXoKZOVCqWpm1mCmg++YsAeqtkQ875qTji2G1a2peJcejTbbTtAXadpdupcoMpautVvt7VeMznikmJbKXpNNMcX498vUtdlA+sjGZPsExnn9+/ZoDv9JtWmNA9YuGXBw8YhqxDS4r1qYTxMe0fsE4bz1C+bg8TACoJDxvg7hqQ0MDqd3pW7n6or4qspOQF47QztRMd6TGPo/AfGAe327DrU/ExXhCoHvHpl49yFVhQIFa1XaYPtgvcgbKst/wfprueZTQ==
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_4699CEF0F3554304B97B30EECB5F1A78junipernet_"
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-Network-Message-Id: 16333b4e-7656-4d66-1bb2-08d58caaccb0
X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Mar 2018 08:32:34.8945 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR05MB3340
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-18_05:, , signatures=0
X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803180107
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/99DZ818abZImkrIeV2BHRbxN-og>
Subject: Re: [yang-doctors] CODE BEGINS to mentions that CODE BEGINS is not used
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Mar 2018 08:32:41 -0000

why do we still extract from the txt instead of the xml, now that xml is mandatory?

using the xml would also resolve the line-spacing issue mentioned by Martin recently.

additionally, xml would allow us to stash (appinfo?) processing instructions, such as the command line needed to generate a tree diagram or to validate an instance document.

regarding generating the tree diagram, i think we’d have to accept a 95% solution, as sometimes tree diagrams are hand-tweaked.

if xml we’re used, presumably this error would not have occurred, as the processing instruction would’ve been missing.

K.

Sent from my iPhone

On Mar 17, 2018, at 6:34 PM, Benoit Claise <bclaise@cisco.com<mailto:bclaise@cisco.com>> wrote:

Dear all,

Here are the hackathon with Joe Clarke, dealing with the yangcatalog.org<http://yangcatalog.org> toolchain.

Excerpt from RFC8346.

B.1.2<https://urldefense.proofpoint.com/v2/url?u=https-3A__tools.ietf.org_html_rfc8346-23appendix-2DB.1.2&d=DwMDaQ&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=9zkP0xnJUvZGJ9EPoOH7Yhqn2gsBYaGTvjISlaJdcZo&m=MlJYZiSsWLnPWhl2UBCt0gRS9tWPXId42ZKwR1Noteo&s=M_puwPZ3Ev02hfC4ET-K-BLXytxd8gMFtWdybmT8UsY&e=>ytxd8gMFtWdybmT8UsY&e=>.  OSPF Topology YANG Module

   The OSPF Topology YANG module is specified below.  As mentioned, the
   module is intended as an example for how the Layer 3 Unicast topology
   model can be extended to cover OSPF topologies, but it is not
   normative.  Accordingly, the module is not delimited with
   <CODE BEGINS> and <CODE ENDS> tags.

  file "example-ospf-topology@2017-12-16.yang"<mailto:example-ospf-topology@2017-12-16.yang>
  module example-ospf-topology {
      yang-version 1.1;
      namespace "urn:example:example-ospf-topology";
      prefix "ex-ospft";
      import ietf-yang-types {
          prefix "yang";
      }

Guess what?
The <CODE BEGINS>, which is supposed to say that <CODE BEGINS> is not used, actually triggers the extraction

$ xym --strict True  --debug 1 rfc8346.txt

Extracting 'ietf-l3-unicast-topology@2018-02-26.yang<mailto:ietf-l3-unicast-topology@2018-02-26.yang>'
   Removed 0 empty lines

Extracting 'ietf-l3-unicast-topology-state@2018-02-26.yang<mailto:ietf-l3-unicast-topology-state@2018-02-26.yang>'
   Removed 0 empty lines
   ERROR: 'rfc8346.txt', Line 1425 - YANG file not specified in <CODE BEGINS>
   ERROR: 'rfc8346.txt', Line 1428 - YANG module 'example-ospf-topology' with <CODE BEGINS> and starting with 'example-'

Extracting 'example-ospf-topology'
   Getting YANG file name from module name: example-ospf-topology.yang
   Removed 0 empty lines
   ERROR: 'rfc8346.txt', Line 1963 - Missing <CODE ENDS>
Created the following models that conform to the strict guidelines:
ietf-l3-unicast-topology@2018-02-26.yang<mailto:ietf-l3-unicast-topology@2018-02-26.yang>
ietf-l3-unicast-topology-state@2018-02-26.yang<mailto:ietf-l3-unicast-topology-state@2018-02-26.yang>
example-ospf-topology.yang

Mainly FYI.

Regards, Benoit

_______________________________________________
yang-doctors mailing list
yang-doctors@ietf.org<mailto:yang-doctors@ietf.org>
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ietf.org_mailman_listinfo_yang-2Ddoctors&d=DwICAg&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=9zkP0xnJUvZGJ9EPoOH7Yhqn2gsBYaGTvjISlaJdcZo&m=MlJYZiSsWLnPWhl2UBCt0gRS9tWPXId42ZKwR1Noteo&s=575Ltmds2wkiPt2cxV2vQbhisuj0BkFsDB13cDIXeDM&e=