xml2rfc icon indicating copy to clipboard operation
xml2rfc copied to clipboard

Need better hangText crossreference format

Open ietf-svn-bot opened this issue 6 years ago • 14 comments

type_enhancement | by [email protected]


In RFC terminology section, terms are usually defined via a hangText, eg:
<t hangText="ACP (ANI/AN) Domain Certificate:" anchor="domcert-def">

Often it is required for one terms explanation to have an xref to another term. But there is no good XREF option to do this because there seems to be no way to refer to the actual hanging text. Instead, the reference will have to show something else, like the section number or so, which is all useless.

The best option i found is like this:
<xref target="domcert-def" format="title">->"ACP domain certificate"</xref>
Because i can not let the xref generate the referred text, the xref has to repeat that whole text, and i also need to write the typical way you show a reference to another term (->).

But this format still creates a redundant () at the end, and IESG reviewers did not like that. 

Maybe i am overlooking something, but i spent a already way too much time just to get to this point of understanding.

example from draft-ietf-anima-autonomic-control-plane-16

This is against xml2rfc.tools.ietf.org. That web page only says v2, so i am just assuming it is 2.5.x.

Issue migrated from trac:347 at 2022-02-05 12:44:30 +0000

ietf-svn-bot avatar Aug 02 '18 15:08 ietf-svn-bot

@[email protected] commented


I agree that the formatter should handle that better.

In my formatter, it seems to work right, see file:///C:/projects/xml2rfc/v3test.html#n-referring-to-list-items.

ietf-svn-bot avatar Aug 02 '18 15:08 ietf-svn-bot

@[email protected] uploaded file xref-tests.xml (23.6 KiB)

test case

ietf-svn-bot avatar Aug 02 '18 16:08 ietf-svn-bot

@[email protected] uploaded file xref-tests.txt (14.9 KiB)

TXT produced by xml2rfc

ietf-svn-bot avatar Aug 02 '18 16:08 ietf-svn-bot

@[email protected] uploaded file xref-tests.html (44.7 KiB)

sample HTML output from rfc2629.xslt

ietf-svn-bot avatar Aug 02 '18 16:08 ietf-svn-bot

@[email protected] changed status from new to under_review

ietf-svn-bot avatar Mar 10 '20 16:03 ietf-svn-bot

@[email protected] commented


This is OBE for v2, but there may still be an analogous enhancement to be made in v3.

ietf-svn-bot avatar Mar 10 '20 16:03 ietf-svn-bot

Missing attachments: (added .txt to overcome GitHub rules). xref-tests.txt xref-tests.html.txt xref-tests.xml.txt

kesara avatar May 27 '22 01:05 kesara

@reschke, @rjsparks: Is this still a valid issue? If so what are the enhancements required?

kesara avatar May 27 '22 01:05 kesara

The original issue description is hard to read; maybe some formatting was lost?

reschke avatar May 27 '22 05:05 reschke

I edited the original description to put the content in blockquotes.

If you suspect you see something broken try to edit it. if it won't let you edit it, try to quote reply and you should see the pre-markdown bits.

rjsparks avatar May 27 '22 21:05 rjsparks

We solved a related problem in https://www.ietf.org/archive/id/draft-ietf-core-href-10.html#c-scheme -- see how the items are defined in Section 2 and referenced in Section 3.

See https://github.com/core-wg/href/blob/main/draft-ietf-core-href.md#constraints-constraints (setup) and https://github.com/core-wg/href/blob/main/draft-ietf-core-href.md#creation-and-normalization (reference) for the source. https://www.ietf.org/archive/id/draft-ietf-core-href-10.xml if you prefer XML.

cabo avatar May 28 '22 05:05 cabo

Well, this does not work too well with definition lists:

{:#ant} ant (en):
: Ameise (de)

{:#bat} bat (en):
: Fledermaus (de), afraid of {{<<cat1}}

{:#cat1} cat (en):
: Katze (de), does not eat {{<<ant}}
<dl>
  <dt anchor="ant">ant (en):</dt>
  <dd>
    <t>Ameise (de)</t>
  </dd>
  <dt anchor="bat">bat (en):</dt>
  <dd>
    <t>Fledermaus (de), afraid of <xref format="title" target="cat1"/></t>
  </dd>
  <dt anchor="cat1">cat (en):</dt>
  <dd>
    <t>Katze (de), does not eat <xref format="title" target="ant"/></t>
  </dd>
</dl>

   ant (en):  Ameise (de)

   bat (en):  Fledermaus (de), afraid of cat1

   cat (en):  Katze (de), does not eat ant

So it uses the anchor as the title (!).

cabo avatar May 28 '22 06:05 cabo

Indeed.

See rfcxml.xslt's output at

https://greenbytes.de/tech/webdav/xref-tests-rfc7991.html#rfc.section.2.7.2

and xml2rfc's

file:///C:/projects/xml2rfc/xref-tests-rfc7991.xml2rfcv3.html#section-2.7.2

for format=title, rfcxml.xslt takes the text content instead of the anchor name.

reschke avatar May 28 '22 06:05 reschke

See also https://github.com/rfc-format/draft-iab-xml2rfc-v3-bis/issues/109#issuecomment-641145352

reschke avatar May 28 '22 06:05 reschke