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

From: Benoit Claise <[email-masked]>
Date: Sat, 17 Mar 2018 18:34:04 +0000

Dear all,

Here are the hackathon with Joe Clarke, dealing with the yangcatalog.org 
toolchain.

Excerpt from RFC8346.

            B.1.2 <https://tools.ietf.org/html/rfc8346#appendix-B.1.2>.
            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 "[email-masked]"
       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 [email-masked]'
    Removed 0 empty lines

Extracting [email-masked]'
    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:
[email-masked]
[email-masked]
example-ospf-topology.yang

Mainly FYI.

Regards, Benoit

---

From: Kent Watsen <[email-masked]>
Date: Sun, 18 Mar 2018 08:32:34 +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 <[email-masked]<mailto:[email-masked]>> 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=>.  OSPF Topology YANG Module

  file "[email-masked]"<mailto:[email-masked]>
  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

Extracting [email-masked]<mailto:[email-masked]>'
   Removed 0 empty lines

Extracting [email-masked]<mailto:[email-masked]>'
   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:
[email-masked]<mailto:[email-masked]>
[email-masked]<mailto:[email-masked]>
example-ospf-topology.yang

Mainly FYI.

Regards, Benoit

_______________________________________________
yang-doctors mailing list
[email-masked]<mailto:[email-masked]>
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=

---

From: Benoit Claise <[email-masked]>
Date: Sun, 18 Mar 2018 09:51:39 +0000

Working out of xml source is on my todo list.
In the IESG meeting right now. From the RFC-editor discussion, "about 
17% of docs do not have any XML source file".
We will be checking how many YANG module-related docs don't have a XML 
source file.

Regards, Benoit

> 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
>
>> 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=>.
>>        file"[email-masked]"
>> [email-masked] <mailto:[email-masked]>