Subject: [xml2rfc] tag DL errors on draft submission

From: Robert Moskowitz <[email-masked]>
Date: Thu, 12 Dec 2019 15:51:49 -0500

I got one draft submitted with the change to <dl> tags, but on the 
second, the txt built with xml2rfc --v3, but when I did the submit I got 
errors:

One or more XML validation errors occurred when processing the XML file:
draft-moskowitz-hip-new-crypto-03.xml: Line 124: Element dl is not 
declared in t list of possible children
draft-moskowitz-hip-new-crypto-03.xml: Line 125: No declaration for 
element dl
draft-moskowitz-hip-new-crypto-03.xml: Line 125: No declaration for 
attribute newline of element dl
draft-moskowitz-hip-new-crypto-03.xml: Line 126: No declaration for 
element dt
draft-moskowitz-hip-new-crypto-03.xml: Line 127: No declaration for 
element dd
draft-moskowitz-hip-new-crypto-03.xml: Line 132: No declaration for 
element dt
draft-moskowitz-hip-new-crypto-03.xml: Line 133: No declaration for 
element dd
draft-moskowitz-hip-new-crypto-03.xml: Line 136: No declaration for 
element dt
draft-moskowitz-hip-new-crypto-03.xml: Line 137: No declaration for 
element dd
draft-moskowitz-hip-new-crypto-03.xml: Line 141: No declaration for 
element dt
draft-moskowitz-hip-new-crypto-03.xml: Line 142: No declaration for 
element dd
draft-moskowitz-hip-new-crypto-03.xml: Line 145: No declaration for 
element dt
draft-moskowitz-hip-new-crypto-03.xml: Line 146: No declaration for 
element dd
draft-moskowitz-hip-new-crypto-03.xml: Line 151: No declaration for 
element dt
draft-moskowitz-hip-new-crypto-03.xml: Line 152: No declaration for 
element dd
draft-moskowitz-hip-new-crypto-03.xml: Line 156: No declaration for 
element dt
draft-moskowitz-hip-new-crypto-03.xml: Line 157: No declaration for 
element dd
draft-moskowitz-hip-new-crypto-03.xml: Line 161: No declaration for 
element dt
draft-moskowitz-hip-new-crypto-03.xml: Line 162: No declaration for 
element dd

Line 124 through 167 is:

     <t>
       <dl newline="true">
         <dt>Keccak (KECCAK Message Authentication Code):</dt>
         <dd>
             The family of all sponge functions with a KECCAK-f
             permutation as the underlying function and multi-rate
             padding as the padding rule.
         </dd>
         <dt>KMAC (KECCAK Message Authentication Code):</dt>
         <dd>
             A PRF and keyed hash function based on KECCAK.
         </dd>
         <dt>cSHAKE (The customizable SHAKE function):</dt>
         <dd>
             Extends the SHAKE scheme to allow users to customize their
             use of the function.
         </dd>
         <dt>SHAKE (Secure Hash Algorithm KECCAK):</dt>
         <dd>
             A secure hash that allows for an arbitrary output length.
         </dd>
         <dt>PRF (Pseudorandom Function):</dt>
         <dd>
             A function that can be used to generate output from a
             random seed such that the output is computationally
             indistinguishable from truly random output.
         </dd>
         <dt>capacity:</dt>
         <dd>
             In the sponge construction, the width of the underlying
             function minus the rate.
         </dd>
         <dt>rate:</dt>
         <dd>
             In the sponge construction, the number of input bits
             processed per invocation of the underlying function.
         </dd>
         <dt>XOF (eXtendable-Output Function):</dt>
         <dd>
             A function on bit strings (also called messages) in which
             the output can be extended to any desired length.
         </dd>
       </dl>
     </t>

What am I missing?

thanks

---

From: Julian Reschke <[email-masked]>
Date: Fri, 13 Dec 2019 06:12:34 +0100

>              the output can be extended to any desired length.

<dl> is a section-level element, so it can not appear inside <t>. See
<https://greenbytes.de/tech/webdav/rfc7991.html#element.dl>.

Best regards, Julian

---

From: Robert Moskowitz <[email-masked]>
Date: Fri, 13 Dec 2019 05:30:45 -0500

> <https://greenbytes.de/tech/webdav/rfc7991.html#element.dl>.

OK. I will make the change, but it worked just fine in:

draft-moskowitz-orchid-cshake-01

And in both cases xml2rfc --v3 had no problem with it.

---

From: Julian Reschke <[email-masked]>
Date: Fri, 13 Dec 2019 12:03:59 +0100

On 13.12.2019 11:30, Robert Moskowitz wrote:
> ...
> ...

Please provide the sources for both files, and I can have a look what's
different.

Best regards, Julian

---

From: Robert Moskowitz <[email-masked]>
Date: Fri, 13 Dec 2019 08:45:28 -0500

Here they are.

---

From: Robert Moskowitz <[email-masked]>
Date: Fri, 13 Dec 2019 08:47:25 -0500

OH, I have not submitted draft-moskowitz-orchid-cshake-01 yet.  I only 
made the changes to the definition section  in preparation for making 
other changes.

So the submit rejection is only on the new-crypto xml.  Both passed the 
xml2rfc script.

---

From: Julian Reschke <[email-masked]>
Date: Fri, 13 Dec 2019 15:04:24 +0100

> So the submit rejection is only on the new-crypto xml.  Both passed the

Interesting.

Both pass for me with "--v3"; both fail for me without.

The fact that <dl> is accepted as a child node of <t> seems to be a bug
in xml2rfc; you should report it at
<https://trac.tools.ietf.org/tools/xml2rfc/trac/>.

Best regards, Julian

---

From: Robert Moskowitz <[email-masked]>
Date: Fri, 13 Dec 2019 09:10:14 -0500

> <https://trac.tools.ietf.org/tools/xml2rfc/trac/>.

I will do that after we figure out why without the <t> it still failed 
the submission.

See attached.

One or more XML validation errors occurred when processing the XML file:
draft-moskowitz-hip-new-crypto-03.xml: Line 123: Element section content 
does not follow the DTD, expecting ((t | figure | texttable | iref)* , 
section*), got (dl)
draft-moskowitz-hip-new-crypto-03.xml: Line 124: No declaration for 
element dl
draft-moskowitz-hip-new-crypto-03.xml: Line 124: No declaration for 
attribute newline of element dl
draft-moskowitz-hip-new-crypto-03.xml: Line 125: No declaration for 
element dt
draft-moskowitz-hip-new-crypto-03.xml: Line 126: No declaration for 
element dd
draft-moskowitz-hip-new-crypto-03.xml: Line 131: No declaration for 
element dt
draft-moskowitz-hip-new-crypto-03.xml: Line 132: No declaration for 
element dd
draft-moskowitz-hip-new-crypto-03.xml: Line 135: No declaration for 
element dt
draft-moskowitz-hip-new-crypto-03.xml: Line 136: No declaration for 
element dd
draft-moskowitz-hip-new-crypto-03.xml: Line 140: No declaration for 
element dt
draft-moskowitz-hip-new-crypto-03.xml: Line 141: No declaration for 
element dd
draft-moskowitz-hip-new-crypto-03.xml: Line 144: No declaration for 
element dt
draft-moskowitz-hip-new-crypto-03.xml: Line 145: No declaration for 
element dd
draft-moskowitz-hip-new-crypto-03.xml: Line 150: No declaration for 
element dt
draft-moskowitz-hip-new-crypto-03.xml: Line 151: No declaration for 
element dd
draft-moskowitz-hip-new-crypto-03.xml: Line 155: No declaration for 
element dt
draft-moskowitz-hip-new-crypto-03.xml: Line 156: No declaration for 
element dd
draft-moskowitz-hip-new-crypto-03.xml: Line 160: No declaration for 
element dt
draft-moskowitz-hip-new-crypto-03.xml: Line 161: No declaration for 
element dd
draft-moskowitz-hip-new-crypto-03.xml: Line 477: Element section content 
does not follow the DTD, expecting ((t | figure | texttable | iref)* , 
section*), got (t dl)
draft-moskowitz-hip-new-crypto-03.xml: Line 482: No declaration for 
element dl
draft-moskowitz-hip-new-crypto-03.xml: Line 482: No declaration for 
attribute newline of element dl
draft-moskowitz-hip-new-crypto-03.xml: Line 483: No declaration for 
element dt
draft-moskowitz-hip-new-crypto-03.xml: Line 484: No declaration for 
element dd
draft-moskowitz-hip-new-crypto-03.xml: Line 489: No declaration for 
element dt
draft-moskowitz-hip-new-crypto-03.xml: Line 490: No declaration for 
element dd
draft-moskowitz-hip-new-crypto-03.xml: Line 494: No declaration for 
element dt
draft-moskowitz-hip-new-crypto-03.xml: Line 495: No declaration for 
element dd
draft-moskowitz-hip-new-crypto-03.xml: Line 499: No declaration for 
element dt
draft-moskowitz-hip-new-crypto-03.xml: Line 500: No declaration for 
element dd

---

From: Julian Reschke <[email-masked]>
Date: Fri, 13 Dec 2019 15:21:24 +0100

> does not follow the DTD, expecting ((t | figure | texttable | iref)* ,

xml2rfc tries to validate this as v2 document, and fails.

I don't know how the submission system detects "v3". Minimally, you
probably should set the version attribute on the <rfc> element; see
<https://greenbytes.de/tech/webdav/rfc7991.html#element.rfc.attribute.version>.

Best regards, Julian

---

From: Carsten Bormann <[email-masked]>
Date: Fri, 13 Dec 2019 15:24:26 +0100

On Dec 13, 2019, at 15:21, Julian Reschke <[email-masked]> wrote:
> 
> I don't know how the submission system detects "v3".

I also don’t know what that even means (what does it do differently when it »detects “v3”«).

Grüße, Carsten

---

From: Julian Reschke <[email-masked]>
Date: Fri, 13 Dec 2019 15:31:11 +0100

> I also don’t know what that even means (what does it do differently when it »detects “v3”«).

xml2rfc contains two formatters, the legacy one (v2) and a new one.

The new elements are only accepted by the new formatter.

(Henrik, correct me if I'm wrong).

Best regards, Julian

PS: rfc2629.xslt follows a different strategy; it's a single code base,
accepting "all". Maybe at some point in the future it will start
emitting warnings for things that are deprecated in v3.

---

From: Carsten Bormann <[email-masked]>
Date: Fri, 13 Dec 2019 16:04:15 +0100

> xml2rfc contains two formatters, the legacy one (v2) and a new one.

But what is the point of invoking the legacy formatter?
Shouldn’t all documents go through v2v3 now?
(OK, *failing that* might want to trigger legacy formatting, to avoid v2v3 bugs becoming a point of failure.)

> The new elements are only accepted by the new formatter.

Of course.

> emitting warnings for things that are deprecated in v3.

Makes a lot of sense to me.

Grüße, Carsten

---

From: Robert Moskowitz <[email-masked]>
Date: Fri, 13 Dec 2019 11:05:59 -0500

> <https://greenbytes.de/tech/webdav/rfc7991.html#element.rfc.attribute.version>.

I see I have more changes to do in the <rfc> element, as I have 'old' 
deprecated usage to fix.  But meanwhile:

Incompatible schema information: found "rfc2629.dtd" in <DOCTYPE> of a 
version 3 file

So now what?  I thought, well maybe the .dtd for DOCTYPE has changed as 
well.  I tried 7991 and 7749 in place of 2629 and they did not exist.

So I searched rfc7991 for DOCTYPE and did not find any reference!

What do I put there?

I will change <rfc> to current after I get this working......

thanks

---

From: Henrik Levkowetz <[email-masked]>
Date: Fri, 13 Dec 2019 17:45:37 +0100

Hi Bob,

> On 13 Dec 2019, at 17:05, Robert Moskowitz <[email-masked]> wrote:
> 
> I see I have more changes to do in the <rfc> element, as I have 'old' deprecated usage to fix.  But meanwhile:
> 
> Incompatible schema information: found "rfc2629.dtd" in <DOCTYPE> of a version 3 file
> 
> So now what?  I thought, well maybe the .dtd for DOCTYPE has changed as well.  I tried 7991 and 7749 in place of 2629 and they did not exist.

The easiest way forward might be to run your xml file through the v2v3 converter to get a valid v3 starting point:

xml2rfc --v2v3 v2file.xml

Best,

    Henrik

---

From: Julian Reschke <[email-masked]>
Date: Fri, 13 Dec 2019 18:04:42 +0100

> So I searched rfc7991 for DOCTYPE and did not find any reference!

Nothing. Just remove the DOCTYPE.

Best regards, Julian

---

From: Robert Moskowitz <[email-masked]>
Date: Fri, 13 Dec 2019 13:45:25 -0500

> Nothing. Just remove the DOCTYPE.

I got a real problem here.  I delete the DOCTYPE line and run and it 
runs and runs:

xml2rfc --v3 draft-moskowitz-hip-new-crypto-03.xml
draft-moskowitz-hip-new-crypto-03.xml(12): Warning: Expected a valid 
submissionType (stream) setting, one of IETF, IAB, IRTF, independent, 
but found None.  Will use 'IETF'
draft-moskowitz-hip-new-crypto-03.xml(12): Warning: Setting 
consensus="true" for IETF STD document (this is not the schema default, 
but is the only value permitted for this type of document)

and I see in top:

11094 rgm       20   0   56148  44560  14176 R  99.0   0.6  26:03.81 
xml2rfc

So something is rotten here.

---

From: Robert Moskowitz <[email-masked]>
Date: Fri, 13 Dec 2019 13:46:48 -0500

> Nothing. Just remove the DOCTYPE.

When I abort the script I get:

^CTraceback (most recent call last):
   File 
"/home/rgm/.local/lib/python3.7/site-packages/xml2rfc/writers/base.py", 
line 1871, in downcode
     e.text.encode('ascii')
UnicodeEncodeError: 'ascii' codec can't encode character '\u201c' in 
position 103: ordinal not in range(128)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
   File "/home/rgm/.local/bin/xml2rfc", line 11, in <module>
     load_entry_point('xml2rfc==2.37.1', 'console_scripts', 'xml2rfc')()
   File "/home/rgm/.local/lib/python3.7/site-packages/xml2rfc/run.py", 
line 587, in main
     xmlrfc.tree = prep.prep()
   File 
"/home/rgm/.local/lib/python3.7/site-packages/xml2rfc/writers/preptool.py", 
line 343, in prep
     func(e, e.getparent())
   File 
"/home/rgm/.local/lib/python3.7/site-packages/xml2rfc/writers/preptool.py", 
line 528, in check_ascii_text
     self.downcode_punctuation()
   File 
"/home/rgm/.local/lib/python3.7/site-packages/xml2rfc/writers/base.py", 
line 1856, in downcode_punctuation
     self.downcode(replacements=punctuation)
   File 
"/home/rgm/.local/lib/python3.7/site-packages/xml2rfc/writers/base.py", 
line 1873, in downcode
     e.text = downcode(e.text, replacements=replacements)
   File 
"/home/rgm/.local/lib/python3.7/site-packages/xml2rfc/util/unicode.py", 
line 196, in downcode
     str = re.sub(match.group(1), entity, str)
   File "/usr/lib64/python3.7/re.py", line 192, in sub
     return _compile(pattern, flags).sub(repl, string, count)
KeyboardInterrupt

---

From: Julian Reschke <[email-masked]>
Date: Fri, 13 Dec 2019 19:49:45 +0100

> but is the only value permitted for this type of document)

That part is harmless, but see
<https://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/420>.

> So something is rotten here.

If you send me the doc, I can give it a try.

Best regards, Julian