Subject: [xml2rfc-dev] Conversion errors

From: Jim Schaad <[email-masked]>
Date: Sun, 16 Jul 2017 15:51:53 +0200

Since I have not gotten lxml to build yet for me,  I used the version on
xml2rc.tools.ietf.org to do the conversion.

xml2rc.tools.ietf.org to do the conversion.

I used my cose draft as input -
https://datatracker.ietf.org/doc/rfc8152/

I don't think the RFC Editor updates the xml - I am using the one I updated
the last time.

1) Error number 1 - invalid xml

Input:

          <texttable anchor="CBOR-Tags" title="COSE Message Identification">
            <ttcol>CBOR Tag</ttcol>    <ttcol>cose-type</ttcol>
<ttcol>Data Item</ttcol>        <ttcol>Semantics</ttcol>
            <c>98</c>                 <c>cose-sign</c>
<c>COSE_Sign</c>                <c>COSE Signed Data Object</c>
            <c>18</c>                 <c>cose-sign1</c>
<c>COSE_Sign1</c>               <c>COSE Single Signer Data Object</c>
            <c>96</c>                 <c>cose-encrypt</c>
<c>COSE_Encrypt</c>           <c>COSE Encrypted Data Object</c>
            <c>16</c>                 <c>cose-encrypt0</c>
<c>COSE_Encrypt0</c>           <c>COSE Single Recipient Encrypted Data
Object</c>
            <c>97</c>                 <c>cose-mac</c>
<c>COSE_Mac</c>                 <c>COSE Mac-ed Data Object</c>
            <c>17</c>                 <c>cose-mac0</c>
<c>COSE_Mac0</c>                <c>COSE Mac w/o Recipients Object</c>
          </texttable>

In the table below -you see 

<th></tr><!-- CONVERT converting <ttcol> to <th> -->Semantics</th></tr>

Looks to be emitting the </tr> element in the wrong location.

      <!-- Table 1 -->
          <table anchor='CBOR-Tags' title='COSE Message Identification'><!--
CONVERT converting <texttable> to <table> -->
            <tr><th><!-- CONVERT converting <ttcol> to <th> -->CBOR
Tag</th><!-- CONVERT </ttcol> replaced with </th> -->    <th><!-- CONVERT
converting <ttcol> to <th> -->cose-type</th><!-- CONVERT </ttcol> replaced
with </th> -->        <th><!-- CONVERT converting <ttcol> to <th> -->Data
Item</th><!-- CONVERT </ttcol> replaced with </th> -->        <th></tr><!--
CONVERT converting <ttcol> to <th> -->Semantics</th></tr><!-- CONVERT
</ttcol> replaced with </th> -->
            <tr><td><!-- CONVERT converting <c> to <td> -->98</td><!--
CONVERT </c> replaced with </td> -->                 <td><!-- CONVERT
converting <c> to <td> -->cose-sign</td><!-- CONVERT </c> replaced with
</td> -->                <td><!-- CONVERT converting <c> to <td>
-->COSE_Sign</td><!-- CONVERT </c> replaced with </td> -->
<td></tr><!-- CONVERT converting <c> to <td> -->COSE Signed Data
Object</td></tr><!-- CONVERT </c> replaced with </td> -->
            <tr><td><!-- CONVERT converting <c> to <td> -->18</td><!--
CONVERT </c> replaced with </td> -->                 <td><!-- CONVERT
converting <c> to <td> -->cose-sign1</td><!-- CONVERT </c> replaced with
</td> -->               <td><!-- CONVERT converting <c> to <td>
-->COSE_Sign1</td><!-- CONVERT </c> replaced with </td> -->
<td></tr><!-- CONVERT converting <c> to <td> -->COSE Single Signer Data
Object</td></tr><!-- CONVERT </c> replaced with </td> -->
            <tr><td><!-- CONVERT converting <c> to <td> -->96</td><!--
CONVERT </c> replaced with </td> -->                 <td><!-- CONVERT
converting <c> to <td> -->cose-encrypt</td><!-- CONVERT </c> replaced with
</td> -->           <td><!-- CONVERT converting <c> to <td>
-->COSE_Encrypt</td><!-- CONVERT </c> replaced with </td> -->
<td></tr><!-- CONVERT converting <c> to <td> -->COSE Encrypted Data
Object</td></tr><!-- CONVERT </c> replaced with </td> -->
            <tr><td><!-- CONVERT converting <c> to <td> -->16</td><!--
CONVERT </c> replaced with </td> -->                 <td><!-- CONVERT
converting <c> to <td> -->cose-encrypt0</td><!-- CONVERT </c> replaced with
</td> -->           <td><!-- CONVERT converting <c> to <td>
-->COSE_Encrypt0</td><!-- CONVERT </c> replaced with </td> -->
<td></tr><!-- CONVERT converting <c> to <td> -->COSE Single Recipient
Encrypted Data Object</td></tr><!-- CONVERT </c> replaced with </td> -->
            <tr><td><!-- CONVERT converting <c> to <td> -->97</td><!--
CONVERT </c> replaced with </td> -->                 <td><!-- CONVERT
converting <c> to <td> -->cose-mac</td><!-- CONVERT </c> replaced with </td>
-->                 <td><!-- CONVERT converting <c> to <td>
-->COSE_Mac</td><!-- CONVERT </c> replaced with </td> -->
<td></tr><!-- CONVERT converting <c> to <td> -->COSE Mac-ed Data
Object</td></tr><!-- CONVERT </c> replaced with </td> -->
            <tr><td><!-- CONVERT converting <c> to <td> -->17</td><!--
CONVERT </c> replaced with </td> -->                 <td><!-- CONVERT
converting <c> to <td> -->cose-mac0</td><!-- CONVERT </c> replaced with
</td> -->                <td><!-- CONVERT converting <c> to <td>
-->COSE_Mac0</td><!-- CONVERT </c> replaced with </td> -->
<td></tr><!-- CONVERT converting <c> to <td> -->COSE Mac w/o Recipients
Object</td></tr><!-- CONVERT </c> replaced with </td> -->
          </table><!-- CONVERT </texttable> replaced with </table> -->
      <!-- Table 1 -->
          <table anchor='CBOR-Tags' title='COSE Message Identification'><!--
CONVERT converting <texttable> to <table> -->
            <tr><th><!-- CONVERT converting <ttcol> to <th> -->CBOR
Tag</th><!-- CONVERT </ttcol> replaced with </th> -->    <th><!-- CONVERT
converting <ttcol> to <th> -->cose-type</th><!-- CONVERT </ttcol> replaced
with </th> -->        <th><!-- CONVERT converting <ttcol> to <th> -->Data
Item</th><!-- CONVERT </ttcol> replaced with </th> -->        <th></tr><!--
CONVERT converting <ttcol> to <th> -->Semantics</th></tr><!-- CONVERT
</ttcol> replaced with </th> -->
            <tr><td><!-- CONVERT converting <c> to <td> -->98</td><!--
CONVERT </c> replaced with </td> -->                 <td><!-- CONVERT
converting <c> to <td> -->cose-sign</td><!-- CONVERT </c> replaced with
</td> -->                <td><!-- CONVERT converting <c> to <td>
-->COSE_Sign</td><!-- CONVERT </c> replaced with </td> -->
<td></tr><!-- CONVERT converting <c> to <td> -->COSE Signed Data
Object</td></tr><!-- CONVERT </c> replaced with </td> -->
            <tr><td><!-- CONVERT converting <c> to <td> -->18</td><!--
CONVERT </c> replaced with </td> -->                 <td><!-- CONVERT
converting <c> to <td> -->cose-sign1</td><!-- CONVERT </c> replaced with
</td> -->               <td><!-- CONVERT converting <c> to <td>
-->COSE_Sign1</td><!-- CONVERT </c> replaced with </td> -->
<td></tr><!-- CONVERT converting <c> to <td> -->COSE Single Signer Data
Object</td></tr><!-- CONVERT </c> replaced with </td> -->
            <tr><td><!-- CONVERT converting <c> to <td> -->96</td><!--
CONVERT </c> replaced with </td> -->                 <td><!-- CONVERT
converting <c> to <td> -->cose-encrypt</td><!-- CONVERT </c> replaced with
</td> -->           <td><!-- CONVERT converting <c> to <td>
-->COSE_Encrypt</td><!-- CONVERT </c> replaced with </td> -->
<td></tr><!-- CONVERT converting <c> to <td> -->COSE Encrypted Data
Object</td></tr><!-- CONVERT </c> replaced with </td> -->
            <tr><td><!-- CONVERT converting <c> to <td> -->16</td><!--
CONVERT </c> replaced with </td> -->                 <td><!-- CONVERT
converting <c> to <td> -->cose-encrypt0</td><!-- CONVERT </c> replaced with
</td> -->           <td><!-- CONVERT converting <c> to <td>
-->COSE_Encrypt0</td><!-- CONVERT </c> replaced with </td> -->
<td></tr><!-- CONVERT converting <c> to <td> -->COSE Single Recipient
Encrypted Data Object</td></tr><!-- CONVERT </c> replaced with </td> -->
            <tr><td><!-- CONVERT converting <c> to <td> -->97</td><!--
CONVERT </c> replaced with </td> -->                 <td><!-- CONVERT
converting <c> to <td> -->cose-mac</td><!-- CONVERT </c> replaced with </td>
-->                 <td><!-- CONVERT converting <c> to <td>
-->COSE_Mac</td><!-- CONVERT </c> replaced with </td> -->
<td></tr><!-- CONVERT converting <c> to <td> -->COSE Mac-ed Data
Object</td></tr><!-- CONVERT </c> replaced with </td> -->
            <tr><td><!-- CONVERT converting <c> to <td> -->17</td><!--
CONVERT </c> replaced with </td> -->                 <td><!-- CONVERT
converting <c> to <td> -->cose-mac0</td><!-- CONVERT </c> replaced with
</td> -->                <td><!-- CONVERT converting <c> to <td>
-->COSE_Mac0</td><!-- CONVERT </c> replaced with </td> -->
<td></tr><!-- CONVERT converting <c> to <td> -->COSE Mac w/o Recipients
Object</td></tr><!-- CONVERT </c> replaced with </td> -->
          </table><!-- CONVERT </texttable> replaced with </table> -->

2)  Invalid XML

* Input: 
            <t hangText='crit:'>

Output:
            <dt><t>crit:</dt><dd><!-- CONVERT converting <t> to <dt>+<dd>
-->
<!-- CONVERT moving <t hangText=...> to <dt> -->

3) Invalid XML
The </t> did not have a beginning one.

* Input:
              The array MUST have at least one value in it.
              <vspace/>
              Not all labels need to be included in the 'crit' parameter.

* Output:
              The array MUST have at least one value in it.
              </t><t><!-- CONVERT <vspace/> inside list converted to nested
<t> -->
              Not all labels need to be included in the 'crit' parameter.

---

From: Henrik Levkowetz <[email-masked]>
Date: Mon, 17 Jul 2017 11:34:18 +0200

Hi Jim,

I wonder if you used Tony's older convertv2v3 here -- since the
new code is operating on the parsed xml tree data structure, it
would be an error in lxml's serialization if there was incorrect
tag ordering.  Tony's tool does have a few issues like that, however.

Could you send me the xml you used, so I can verify here that I
don't get the results below with the xml2rfc --v2v3 conversion?

Best regards,

	Henrik

---

From: Jim Schaad <[email-masked]>
Date: Mon, 17 Jul 2017 11:45:40 +0200

I will fix the bug and retry locally first.

-----Original Message-----
From: Henrik Levkowetz [mailto:[email-masked]] 
Sent: Monday, July 17, 2017 11:34 AM
To: Jim Schaad <[email-masked]>
Cc: [email-masked]
Subject: Re: Conversion errors

Hi Jim,

I wonder if you used Tony's older convertv2v3 here -- since the new code is operating on the parsed xml tree data structure, it would be an error in lxml's serialization if there was incorrect tag ordering.  Tony's tool does have a few issues like that, however.

Could you send me the xml you used, so I can verify here that I don't get the results below with the xml2rfc --v2v3 conversion?

Best regards,

	Henrik

On 2017-07-16 15:51, Jim Schaad wrote:
> Since I have not gotten lxml to build yet for me,  I used the version 
> on xml2rc.tools.ietf.org to do the conversion.
> 
> I don't think the RFC Editor updates the xml - I am using the one I 
> updated the last time.
> 
>           <table anchor='CBOR-Tags' title='COSE Message 
> Identification'><!-- CONVERT converting <texttable> to <table> -->
>           <table anchor='CBOR-Tags' title='COSE Message 
> Identification'><!-- CONVERT converting <texttable> to <table> -->
>               </t><t><!-- CONVERT <vspace/> inside list converted to 
> nested <t> -->

---

From: "HANSEN, TONY L" <[email-masked]>
Date: Mon, 17 Jul 2017 11:43:10 +0000

I just put up an option on Friday as part of the xml2rfc webform at http://xml2rfc.tools.ietf.org/experimental.html 
Did you run these tests using the old prototype or using the xml2rfc option?

If it was using the old prototype, please re-run them using the xml2rfc webform at the TOP of experimental.html. Thanks!

	Tony

On 7/16/17, 9:51 AM, "xml2rfc-dev on behalf of Jim Schaad" <[email-masked] on behalf of [email-masked]> wrote:

    
    I used my cose draft as input -
    https://urldefense.proofpoint.com/v2/url?u=https-3A__datatracker.ietf.org_doc_rfc8152_&d=DwICAg&c=LFYZ-o9_HUMeMTSQicvjIg&r=Kz8VdgPVctDNSNPJ6PsBaw&m=2EXGlvC-iD1wPEaXsuAuMg7jjQHmrZDrf1kB3PXv8SQ&s=JjOo1Nnm5HLQ2b-mUUs5Ml_Rdz4TSFYdhS7lwP3xfEo&e= 

    
    Input:

    

          <!-- Table 1 -->

    2)  Invalid XML
    
    * Input: 
                <t hangText='crit:'>
    
    Output:

    3) Invalid XML
    
    * Input:
    
    * Output:
    
    _______________________________________________
    xml2rfc-dev mailing list
    [email-masked]
    https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ietf.org_mailman_listinfo_xml2rfc-2Ddev&d=DwICAg&c=LFYZ-o9_HUMeMTSQicvjIg&r=Kz8VdgPVctDNSNPJ6PsBaw&m=2EXGlvC-iD1wPEaXsuAuMg7jjQHmrZDrf1kB3PXv8SQ&s=cZeH5VsBu_x53UUX2EHTaHqPtlBHI8zmexRacJ0GdX4&e=

---

From: Jim Schaad <[email-masked]>
Date: Mon, 17 Jul 2017 14:27:01 +0200

I used the old prototype version I think.  I ran it on sunday

Jim

-----Original Message-----
From: HANSEN, TONY L [mailto:[email-masked]] 
Sent: Monday, July 17, 2017 1:43 PM
To: Jim Schaad <[email-masked]>; 'Henrik Levkowetz' <[email-masked]>
Cc: [email-masked]
Subject: Re: [xml2rfc-dev] Conversion errors

	Tony

    

    
    
    Input:

    

          <!-- Table 1 -->

    2)  Invalid XML
    
    * Input: 
                <t hangText='crit:'>
    
    Output:

    3) Invalid XML
    
    * Input:
    
    * Output:

---

From: "HANSEN, TONY L" <[email-masked]>
Date: Mon, 17 Jul 2017 13:51:41 +0000

Thanks Jim. Please re-run your tests using the new xml2rfc option (see the top web form on http://xml2rfc.tools.ietf.org/experimental.html).

I tweaked the experimental.html page today to de-emphasize the old prototype code, moving it to the bottom of the page.

	Tony

On 7/17/17, 8:27 AM, "Jim Schaad" <[email-masked]> wrote:

    Jim

    -----Original Message-----
    From: HANSEN, TONY L [mailto:[email-masked]] 
    Sent: Monday, July 17, 2017 1:43 PM
    To: Jim Schaad <[email-masked]>; 'Henrik Levkowetz' <[email-masked]>
    Cc: [email-masked]
    Subject: Re: [xml2rfc-dev] Conversion errors
    
    I just put up an option on Friday as part of the xml2rfc webform at https://xml2rfc.tools.ietf.org/experimental.html 
    Did you run these tests using the old prototype or using the xml2rfc option?

    	Tony

        

        
        
        Input:

        

              <!-- Table 1 -->

        2)  Invalid XML
        
        * Input: 
                    <t hangText='crit:'>
        
        Output:

        3) Invalid XML
        
        * Input:
        
        * Output: