[rfc-i] "vanity" reference anchors

Julian Reschke julian.reschke at gmx.de
Thu Apr 17 05:45:44 PDT 2014


Hi there,

people frequently ask for "vanity" reference anchors (where the anchor 
is not the default, such as "RFC2616", but something more readable, like 
"HTTP").

A straightforward way to get this is to simply change the anchor 
attribute value of the <reference> element.

However, this

a) doesn't work well with some people's workflows, where the <reference> 
elements always are included from a bibliography, and

b) it fails when the desired name isn't a valid XML ID (such as 
something starting with a digit).

Proposed solution:

- allow people to embed "vanity name" mappings into the document, and

- have these mappings *only* affect display

Syntax:

   <display-reference from="OLD" to="NEW" />

...where @from matches the existing reference/@anchor, and @to is the 
replacement string, such as in

   <display-reference from="RFC2616" to="HTTP" />

Allow these elements in two places:

1) as child node of <rfc>

2) as child node of <references>

Case 1) is useful for people who want to include a list of mappings 
maintained in a separate file. Case 2) is useful so that the mapping can 
be maintained close to the <reference> it affects.

Syntax of @to: probably should be constrained, for instance, it 
whitespace. A pragmatic approach might be to allow all XML name 
characters (<http://www.w3.org/TR/REC-xml/#NT-NameChar>), lifting the 
constraint on the first character...

Best regards, Julian

PS: xml2rfc IDs currently already allow non-ASCII characters (per XML's 
ID rules); we probably should add a USASCII-constraint, right?


More information about the rfc-interest mailing list