Subject: [xml2rfc] warning on the xml for a old draft

From: Loa Andersson <[email-masked]>
Date: Sun, 6 Feb 2022 16:08:02 +0800

Folks,

I have a draft that I started out in xmlv2 a long time a long time ago. 
I has been converted to .txt without any problems all the time, but now 
I get the following warning:

Warning: 
/usr/local/lib/python3.6/site-packages/xml2rfc/templates/rfc2629-xhtml.ent 
is no longer needed as the special processing of non-ASCII characters 
has been superseded by direct support for non-ASCII characters in RFCXML

What is that can be removed?

/Loa

-- 
Loa Andersson                        email: [email-masked]
Senior MPLS Expert                          [email-masked]
Bronze Dragon Consulting             phone: +46 739 81 21 64

---

From: Randy Bush <[email-masked]>
Date: Sun, 06 Feb 2022 09:55:12 -0800

> What is that can be removed?

<!--DOCTYPE rfc SYSTEM "rfc2629.dtd"-->

---

From: Julian Reschke <[email-masked]>
Date: Mon, 7 Feb 2022 09:09:09 +0100

> <!--DOCTYPE rfc SYSTEM "rfc2629.dtd"-->

Unless I'm missing something that is misleading.

Yes, you can use non-ASCII characters (such as non-breaking-space)
verbatim in the XML source (for instance encoded as UTF-8 or as
"&#160;"). However, if you want to use the *named* entities (such as
"&nbsp;"), you still need to declare them somehow.

Best regards, Julian

---

From: Carsten Bormann <[email-masked]>
Date: Mon, 7 Feb 2022 10:27:39 +0100

> "&nbsp;"), you still need to declare them somehow.

It seems we are now all supposed to use this standard preamble (abbreviated from [1]):

<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>  
<!-- <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> -->
<!-- This third-party XSLT can be enabled for direct transformations in XML processors, including most browsers -->
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<!-- If further character entities are required then they should be added to the DOCTYPE above.
     Use of an external entity file is not recommended. -->

So with this standard preamble, we would have the five predefined XML entities (&lt &gt &amp &quot &apos) plus the four above (I still don’t know what makes exactly these four so special; a similar set are called “Typographic help characters” in rfc2629-xhtml.ent but include &br for U+2028).

Grüße, Carsten

---

From: Julian Reschke <[email-masked]>
Date: Mon, 7 Feb 2022 10:54:15 +0100

> So with this standard preamble, we would have the five predefined XML entities (&lt &gt &amp &quot &apos) plus the four above (I still don’t know what makes exactly these four so special; a similar…

They are "special" in that they are actively used by the RFC Production
Center.

(FWIW I agree that we need more clarity about what non-ASCII characters
are allowed, and how they are processed)

Best regards, Julian

---

From: Carsten Bormann <[email-masked]>
Date: Mon, 7 Feb 2022 11:07:05 +0100

> are allowed, and how they are processed)

Well, the first one is well-defined in the source code for xml2rfc, in unicode.py:

def isascii(u):
…
        for ch in [ '\u00a0', '\u200B', '\u2011', '\u2028', '\u2060', ]:
… accept them as “ASCII”…

With this commentary

        '\u00a0'                     # non-breaking whitespace
        '\u2060'                     # word joiner
        '\u200B'                     # zero-width space
        '\u2011'                     # non-breaking hyphen
        '\u2028'                     # line separator
        '\uE060'                     # word joiner

(I don’t know how U+E060 gets in there as an alternative for U+2060, nor do I understand the special role U+E060 seems to play in xml2rfc source.)

Grüße, Carsten

---

From: "David R. Oran" <[email-masked]>
Date: Mon, 07 Feb 2022 10:42:22 -0500

Is there a defined !ENTITY for an em-dash I can use, or are such good typographic conventions not advisable for RFCs?
?

On 7 Feb 2022, at 4:27, Carsten Bormann wrote:

> _______________________________________________
> xml2rfc mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/xml2rfc
DaveO

---

From: Carsten Bormann <[email-masked]>
Date: Mon, 7 Feb 2022 16:58:54 +0100

On 2022-02-07, at 16:42, David R. Oran <[email-masked]> wrote:
> 
> Is there a defined !ENTITY for an em-dash I can use,

Not without rfc2629-xhtml.ent.

I generally simply type the thing (SHIFT + OPTION + -).

> or are such good typographic conventions not advisable for RFCs?

They are advisable, but currently not allowed (current interpretation of RFC 7997, which needs to be updated for the new decade that has recently started).

As long as that is the case, the usual pipeline kramdown-rfc ➔ xml2rfc will turn em-dashes into -- (and en-dashes into -, which is a larger disaster).

Grüße, Carsten

---

From: Julian Reschke <[email-masked]>
Date: Mon, 7 Feb 2022 16:59:05 +0100

> Is there a defined !ENTITY for an em-dash I can use, or are such good typographic conventions not advisable for RFCs?

AFAIU, the RFC Production Center currently converts mdashes to "--" (sadly).

Best regards, Julian

---

From: "David R. Oran" <[email-masked]>
Date: Mon, 07 Feb 2022 11:06:01 -0500

> AFAIU, the RFC Production Center currently converts mdashes to "--" (sadly).
Sigh - thanks anyway for the quick responses. Those of us whipsawed between LaTex (with the complications of the ACM conference templates) and xml2rfc, just have to deal with the frequent cognitive overload.

Now, if only bibdesk had built-in xml2rfc reference outputs…

DaveO

---

From: Carsten Bormann <[email-masked]>
Date: Mon, 7 Feb 2022 17:11:34 +0100

> Now, if only bibdesk had built-in xml2rfc reference outputs…

DOI references have made life much easier for me here.

informative:
  FOO: DOI.10.1016/0169-7552(89)90019-6
  NIST.SP.800-56a: DOI.10.6028/NIST.SP.800-56a
  NIST.SP.800-56Ar2: DOI.10.6028/NIST.SP.800-56Ar2
  NIST.SP.800-56Ar3: DOI.10.6028/NIST.SP.800-56Ar3

But maybe adding something to bibdesk to generate the reference YAML would not be a bad idea...

Grüße, Carsten

---

From: "John Levine" <[email-masked]>
Date: 7 Feb 2022 13:48:44 -0500

>Is there a defined !ENTITY for an em-dash I can use, or are such good typographic conventions not advisable for RFCs?

I agree it would be nice to have better typography but we need to look
at it in the overall context of what non-ASCII text we allow in RFCs,
keeping in mind that whatever we do needs to render consistently a
decade or two from now.

R's,
John

---

From: Jay Daley <[email-masked]>
Date: Tue, 8 Feb 2022 08:15:57 +1300

> On 8/02/2022, at 4:58 AM, Carsten Bormann <[email-masked]> wrote:
> 

Not quite. 

As https://authors.ietf.org/en/templates-and-schemas#character-entities explains "If you wish to use additional character entities then the recommended method is to add further inline definitions to this DOCTYPE declaration"

The old ent files are now preserved in the GitHub repository for reference and this one https://github.com/ietf-authors/legacy-templates-and-schemas/blob/main/rfc2629-xhtml.ent includes such things as em dash

	<!ENTITY mdash  "&#8212;"><!-- U+2014 EM DASH                                    ("-\u002D")          —>

So your local DOCTYPE declaration would now become

<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
  <!ENTITY mdash  "&#8212;">   (or whatever mnemonic you want)
]>

Though as others points out, em dash is not the best example here.

Jay

-- 
Jay Daley
IETF Executive Director
[email-masked]

---

From: Carsten Bormann <[email-masked]>
Date: Mon, 7 Feb 2022 20:23:19 +0100

> Though as others points out, em dash is not the best example here.

Given that our manuscripts usually have a significant lifetime, preparing them for the day this is fixed is prudent.
Until then, xml2rfc has the regression to multihyphens built in :-)

(But I would still type “—" not &mdash; — just as I’d type Grüße and not Gr&uuml;&ssharp;e.)

Grüße, Carsten

---

From: Julian Reschke <[email-masked]>
Date: Mon, 7 Feb 2022 20:25:39 +0100

Am 07.02.2022 um 20:23 schrieb Carsten Bormann:
> ...

No, the "regression" is only present for plain text output, that's why
the RPC *replaces* the mdashes during AUTH48.

Best regards, Julian

---

From: Julian Reschke <[email-masked]>
Date: Mon, 7 Feb 2022 20:30:46 +0100

> keeping in mind that whatever we do needs to render consistently a

The bigger issue seems to be consistency (when to use mdashes, "smart"
quotes etc).

Best regard, Julian

---

From: Martin J. Dürst <[email-masked]>
Date: Tue, 8 Feb 2022 10:54:15 +0900

> (I don’t know how U+E060 gets in there as an alternative for U+2060, nor do I understand the special role U+E060 seems to play in xml2rfc source.)

U+E060 is a code point in the private use area. It's totally 
inappropriate for xml2rfc, even in a comment. However it got in there, 
it be better taken out as quickly as possible.

Regards,   Martin.

---

From: Julian Reschke <[email-masked]>
Date: Tue, 8 Feb 2022 10:24:41 +0100

> (But I would still type “—" not &mdash; — just as I’d type Grüße and not Gr&uuml;&ssharp;e.)

A typo maybe? <https://en.wikipedia.org/wiki/Word_joiner>

Best regards, Julian