Subject: Re: [xml2rfc-dev] [Ext] Re: [Rfc-markdown] [xml2rfc] <br> is back, was: New xml2rfc release: v2.32.0

From: Julian Reschke <[email-masked]>
Date: Mon, 4 Nov 2019 19:21:40 +0100

On 29.10.2019 08:04, Julian Reschke wrote:
> ...
> As a first step, I'd make it available exactly where the production
> center needs it right now, so that the publication process can proceed.
>
> (I think that means "in <t>" right now)
> ...

...and that would fix the issue for the document in AUTH48, and also
would allow a workaround for contributor insertion that doesn't require
<artwork>.

Another week has passed. How can we make progress here? Heather?

Best regards, Julian

---

From: Heather Flanagan <[email-masked]>
Date: Tue, 5 Nov 2019 12:16:03 -0500

> On Nov 4, 2019, at 1:21 PM, Julian Reschke <[email-masked]> wrote:
> 

Make <br> generally available, and trust the RPC to use it wisely.

-Heather

---

From: Julian Reschke <[email-masked]>
Date: Tue, 5 Nov 2019 19:24:38 +0100

> Make <br> generally available, and trust the RPC to use it wisely.

It's not that easy.

If you allow it everywhere, you need to define how it behaves
everywhere, both for display, and when it gets referenced.

Best regards, Julian

---

From: Heather Flanagan <[email-masked]>
Date: Tue, 5 Nov 2019 13:30:10 -0500

> On Nov 5, 2019, at 1:24 PM, Julian Reschke <[email-masked]> wrote:
> 

It should tell the output formatter to put in whatever break is appropriate to that format that will cause the next words to go to a new line.

Is that what you’re talking about?

-Heather

---

From: Julian Reschke <[email-masked]>
Date: Tue, 5 Nov 2019 19:33:42 +0100

On 05.11.2019 19:30, Heather Flanagan wrote:
> ...
>
> It should tell the output formatter to put in whatever break is
> appropriate to that format that will cause the next words to go to a new
> line.
>

What happens if you put a <br> into a section title, and that gets
references in the TOC, or via <xref format="title"..:>"?

What happens if you put a <br> into a document title, and it appears
inside a <reference>?

Best regards, Julian

---

From: Heather Flanagan <[email-masked]>
Date: Tue, 5 Nov 2019 13:35:49 -0500

> On Nov 5, 2019, at 1:33 PM, Julian Reschke <[email-masked]> wrote:
> 

It is ignored within the TOC (but does change the output in the text)

> What happens if you put a <br> into a document title, and it appears

It is ignored within the reference.

-Heather

---

From: Julian Reschke <[email-masked]>
Date: Tue, 5 Nov 2019 19:40:58 +0100

> It is ignored within the TOC (but does change the output in the text)

Ignoring would mean to have a section with a title of "A<br/>B" to
appear as "AB"...

Best regards, Julian

---

From: Henrik Levkowetz <[email-masked]>
Date: Tue, 5 Nov 2019 19:43:10 +0100

> It is ignored within the reference.

All of that works for me; straightforward and sensible.  I think all
of that matches what I do today for &br; .

	Henrik

---

From: Julian Reschke <[email-masked]>
Date: Tue, 5 Nov 2019 19:52:18 +0100

> of that matches what I do today for &br; .

This doesn't match what what I see; in TXT output, the line is broken,
in HTML output, <br> in inserted.

See attachments.

Best regards, Julian

---

From: Heather Flanagan <[email-masked]>
Date: Tue, 5 Nov 2019 13:55:45 -0500

> On Nov 5, 2019, at 1:52 PM, Julian Reschke <[email-masked]> wrote:
> 

Matching what you see aside, do you have any concerns with my requirements?

Heather

---

From: Julian Reschke <[email-masked]>
Date: Tue, 5 Nov 2019 20:30:31 +0100

> Matching what you see aside, do you have any concerns with my requirements?

Yes, of course.

"Ignoring" the <br> is the wrong thing; you would need to treat is just
like a regular whitespace character. So

   "A<br/>B"

when referenced would be treated just like "A B".

I also recommend to read the HTML5 spec with respect to when <br> is
valid in HTML; we wouldn't want to create invalid HTML, right?

"br elements must not be used for separating thematic groups in a
paragraph." --
<https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-br-element>

Best regards, Julian

---

From: Heather Flanagan <[email-masked]>
Date: Tue, 5 Nov 2019 14:37:03 -0500

> On Nov 5, 2019, at 2:30 PM, Julian Reschke <[email-masked]> wrote:
> 

To be clear, for my own sanity:

Yes, of course you have concerns with the functional requirement I described, or
Yes, of course you have concerns with how the requirement is technically implemented?  

Or both?

> valid in HTML; we wouldn't want to create invalid HTML, right?

How <br> is implemented in the different outputs is going to be contingent on the requirements of that format and what is considered valid. So, of course we want valid HTML. Whether that means a transformation from what the XML says into what the HTML requires is an implementation I don’t have an opinion on. My job is to offer the functional requirements, not tell the developer how to do the job.

-Heather

---

From: Julian Reschke <[email-masked]>
Date: Tue, 5 Nov 2019 20:47:45 +0100

> Yes, of course you have concerns with the functional requirement I described, or

You said that "<br/>" should be ignored when the document/section title
is referenced. I believe that's wrong; it should be treated as whitespace.

> Yes, of course you have concerns with how the requirement is technically implemented?

Well, xml2rfc currently does not implement <br>, but is does implement
the unicode line break character
(<https://www.fileformat.info/info/unicode/char/2028/index.htm>). *That*
implementation carries over the line break into the ToC, and I believe
that's wrong, and it also does not seem to be what you want. (I did not
check what happens with <xref> or <reference>, but I can check that if
that's of interest).

> How <br> is implemented in the different outputs is going to be contingent on the requirements of that format and what is considered valid. So, of course we want valid HTML. Whether that means a tr…

I agree with that, but I note that RFC 7992 tried to actually do that :-).

Best regards, Julian

---

From: Julian Reschke <[email-masked]>
Date: Tue, 5 Nov 2019 20:55:01 +0100

> check what happens with <xref> or <reference>, but I can check that if

Attached: in text output of <reference>s, xml2rfc substitutes the line
break with a whitespace. For <xref format="title"/> the line break is
preserved and appears in the text output.

(I assume the HTML is consistent with that)

Best regards, Julian

---

From: Heather Flanagan <[email-masked]>
Date: Tue, 5 Nov 2019 14:59:11 -0500

> On Nov 5, 2019, at 2:47 PM, Julian Reschke <[email-masked]> wrote:
> 

OK. I’m assuming it’s an implementation detail to make sure we don’t end up with double spaces, then?

> check what happens with <xref> or <reference>, but I can check that if

It’s something fixable. I expect Henrik is working on it.

> I agree with that, but I note that RFC 7992 tried to actually do that :-).

We’re trying to do a lot of things. 

-Heather

---

From: Julian Reschke <[email-masked]>
Date: Tue, 5 Nov 2019 21:08:50 +0100

> OK. I’m assuming it’s an implementation detail to make sure we don’t end up with double spaces, then?

That's actually a good question. In general, in text content, we already
collapse multiple whitespace characters to a single one (exceptions are
only <artwork> and <sourcecode>).

> It’s something fixable. I expect Henrik is working on it.

Yes, sure. But that requires somebody to say what the expected output
is. That's what I've been asking for the whole time.

> We’re trying to do a lot of things.

Let me rephrase this. I always thought that RFC 7992 is way over the top
in making requirements on the HTML output. I think when doing 7992bis,
we'll need to take out lots of these requirements, and just let the
developer find the best HTML output.

Best regards, Julian

---

From: Henrik Levkowetz <[email-masked]>
Date: Tue, 5 Nov 2019 23:56:58 +0100

> It’s something fixable. I expect Henrik is working on it.

Yup.

	Henrik

---

From: Paul Hoffman <[email-masked]>
Date: Tue, 5 Nov 2019 23:10:30 +0000

A side-effect of the use of <br/> in titles, names, and so on means that searching will likely always then be done on the HTML output, not on the canonical XML. If folks are comfortable with that, great, but it does make one of the output formats more important than the canonical format.

--Paul Hoffman

---

From: "Andrew G. Malis" <[email-masked]>
Date: Tue, 5 Nov 2019 18:22:52 -0500

Paul,

IMHO, searching on the XML is wrong for someone researching the actual
protocols, etc. being documented. It would only be appropriate for someone
looking for examples of how to code various constructs in XML.

Cheers,
Andy

On Tue, Nov 5, 2019 at 6:10 PM Paul Hoffman <[email-masked]> wrote:

> A side-effect of the use of <br/> in titles, names, and so on means that
> searching will likely always then be done on the HTML output, not on the
> canonical XML. If folks are comfortable with that, great, but it does make
> one of the output formats more important than the canonical format.
>
> --Paul Hoffman
> _______________________________________________
> xml2rfc-dev mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/xml2rfc-dev
>

---

From: Heather Flanagan <[email-masked]>
Date: Wed, 6 Nov 2019 10:29:23 -0500

> On Nov 5, 2019, at 6:10 PM, Paul Hoffman <[email-masked]> wrote:
> 

A good point, but I will be very, very surprised if anyone choses to do their indexing, etc, against the XML. Google scholar insists on HTML whenever possible, and other services do much the same.

-Heather

---

From: Julian Reschke <[email-masked]>
Date: Wed, 6 Nov 2019 16:34:09 +0100

> A side-effect of the use of <br/> in titles, names, and so on means that searching will likely always then be done on the HTML output, not on the canonical XML. If folks are comfortable with that,…

Not sure I get this. Why would be <br/> in HTML work for searches, when
it does not for XML?

(And yes, the search would need to take the semantics of <br/> into
account in both cases).

Best regards, Julian