xml2rfc
xml2rfc copied to clipboard
seeking a better way to have a blank line followed by an indented dl
Description
Summary: We used <t><br/></t>
to get the desired output. Seems that ideally we wouldn't use <br/>
for this case. Would be helpful to be able to indent a whole <dl>
.
Example: https://www.rfc-editor.org/authors/rfc9381.html (e.g., section 4, 4.1, 4.2, 4.3, and others)
Details: For example (original):
Parameters used:
(n, e) - RSA public key
K - RSA private key (its representation is implementation-
dependent)
k - length in octets of the RSA modulus n (k must be less than
2^32)
Fixed options (specified in Section 4.4):
Hash - cryptographic hash function
hLen - output length in octets of hash function Hash
suite_string - an octet string specifying the RSA-FDH-VRF
ciphersuite, which determines the above options
With the assumption that we'd like the nested lists to be <dl>
bc it's accurate semantically, here are some options: (test files were updated only for the portion above above)
A) <dl>
for outer items, then nested <dl>
- Con:
<t><br/></t>
has to be used to get a blank line after the outer item. - Example: the current file (https://www.rfc-editor.org/authors/rfc9381.html#section-4)
B) <ul bare="true" empty="true"> <li>
for outer items, each of which has a nested <dl>
- Con: yields good text output, but bad HTML and PDF (bc the
<dl>
s are not indented) - Example: https://www.rfc-editor.org/v3test/test9381_bad_ul_in_html.html#section-4 (bad) vs. https://www.rfc-editor.org/v3test/test9381_bad_ul_in_html.txt (good)
C) <t>
for outer items, then a <dl>
.
- Con: the
<dl>
s are not indented. - Example: https://www.rfc-editor.org/v3test/test9381_t_dl.html#section-4
What was done in the original (draft-irtf-cfrg-vrf-15.xml)
D) <t>
for outer items, then a <ul empty="true">
- Cons: not accurate semantically; definitions that are longer than one line do not wrap as desired; past guidance to the RPC was to not use
<ul empty="true">
to create indentation.
Potential improvements here
- better documentation around acceptable use for
<br/>
- B seems to be a bug bc the other outputs should match.
- a new attribute on
<dl>
to indicate "put a blank line after dt" (this is not accomplished with newline="true") (FWIW, testing of changes to the spacing attribute, did not help here.) - the ability to have an indented
<dl>
without nesting it at all. perhaps as a new attribute. (Note: the indent attribute on a dl currently has to do with indenting the lines after the first line. it does not have to do with indenting the dl as as whole.)
Code of Conduct
- [X] I agree to follow the IETF's Code of Conduct
On 2023-04-24, at 23:21, Alice Russo @.***> wrote:
B)
- for outer items, each of which has a nested
I don’t know what @bare is, but @empty is the right way to do this.
• Con: yields good text output, but bad HTML and PDF (bc the
s are not indented)
Can you simply get rid of the bare=“true” (whatever that is)?
v2v3 generates this for me:
<t>outdented</t>
<ul empty="true">
<li>
<dl>
<dt>quoted:</dt>
<dd>
<t>foo</t>
</dd>
<dt>more quoted:</dt>
<dd>
<t>bar</t>
</dd>
</dl>
</li>
</ul>
<t>outdented</t>
Grüße, Carsten
For case C) there is a more general solution that could solve both this and support many other use cases.
As we know, lists are often nested and when those are rendered, each inner list is visually distinct from its outer list, generally through indenting. However, there are many situations when nesting is not possible in the XML, but a list still needs to be rendered as if it were an inner list (e.g. indented). There are also situations where it is necessary to override the automatic separation of inner from outer lists.
Both of these can be achieved by an attribute such as "level-override" added to "dl", "ul" and "ol", which takes a number from 1-5. For now, the only effect of that would be to override the level of indent of the whole list.
On 2023-04-24, at 23:21, Alice Russo @.***> wrote:
a new attribute on
to indicate "put a blank line after dt" (this is not accomplished with newline="true”)
This probably should be a form of newline=“2”
Grüße, Carsten