Subject: [xml2rfc] Split expansion of <u> elements

From: Julian Reschke <[email-masked]>
Date: Mon, 15 Jul 2019 15:04:36 +0200

<https://tools.ietf.org/html/draft-levkowetz-xml2rfc-v3-implementation-notes-09#appendix-A.1.3>:

>    There are cases which cannot be handled with either the simplified or
>    full <u> format specifications.  One is exemplified in Table 1 of the
>    CSS sample document at https://rfc-format.github.io/draft-iab-rfc-
>    css-bis/sample2-v2.html#s-3.  Rendering this with <u> elements
>    requires that the non-ascii content be rendered in one place (a table
>    cell in one column) while the expansion is rendered in another cell
>    in a different column.  Provision for this has been made by modifying
>    the expansion of <u> when it is referenced by an <xref>.  This table,
>    with <u> elements referenced by <xref> instances:

I agree that there's a problem here to be solved, but I'm a bit unhappy
with the proposed solution.

Quoting:

>        <tr>
>          <td>5</td>
>          <td>
>             &lt;
>             <u format="name-num" anchor="greek-upper-sigma">Σ</u>
>             &gt;
>          </td>
>          <td> <xref target="greek-upper-sigma" /> </td>
>        </tr>

is converted to

>        +---+-------------+-----------------------------------------+
>        | 5 | <Σ>         | GREEK CAPITAL LETTER SIGMA (U+03A3)     |
>        +---+-------------+-----------------------------------------+

I think this violates the principle of least surprise, because the fact
that the element is target of an <xref> changes the rendering of the
element.

The following seems more natural to me:

 >        <tr>
 >          <td>5</td>
 >          <td>
 >             &lt;
 >             <u format="lit" anchor="greek-upper-sigma">Σ</u>
 >             &gt;
 >          </td>
 >          <td> <xref target="greek-upper-sigma" /> </td>
 >        </tr>

I would also argue that re-using <xref> complicates something that is
already complex enough. Maybe adding that functionality to <u> itself
would be better:

 >        <tr>
 >          <td>5</td>
 >          <td>
 >             &lt;
 >             <u format="lit" anchor="greek-upper-sigma">Σ</u>
 >             &gt;
 >          </td>
 >          <td> <u target="greek-upper-sigma" format="name-num" /> </td>
 >        </tr>

(it also puts the format attribute in the place it belongs to)

In any case, please by all means consider the feedback about the
rendering of <u> now being dependant on whether it is a link target or not.

Best regards, Julian