Embedded in Document
References are expected to be provided in raw RFC XML v2 format. For v3, a list of crossreferences may
precede the block of references, with alternative text. This will not be rendered, but it will be used
displayreference elements, mapping the reference anchors to display text. For example,
a list entry
 means that any instances of the anchor
ref1 should be displayed as
and is rendered as
<displayreference target="ref1" to="alt1"/>.
RFC requires two separate bibliographies, one for normative and one for informative references;
either can be omitted. All bibliography sections in the must be styled with the prefix
and must appear in sequence, before any appendices.
By default, the references cited must be included as raw RFC XML, and separated into the normative and informative sections.
[[id]] (1) [bibliography] == Normative References * [[[ref1,alt1]]] (2) ++++ (raw XML) (3) ++++ [[id]] (1) [bibliography] == Informative References ++++ (raw XML) (2) ++++
back/references@anchor(only in v3)
back/displayreference@to(only in v3)
In postprocessing, bibliographic entries available from http://xml.resource.org/public/rfc are replaced with external references to that entry, using XML entities in RFC XML v2, and XML includes in RFC XML v3. Do not insert your own entities or XML includes into the references; Metanorma-IETF will have difficulty processing them.
As an alternative, the document attribute
:biblio-dir: can nominate a directory in which separate XML files can be placed, one for each reference to be included. (RFC XML v3 referencegroup elements will also be recognized as files.)
Metanorma-IETF will read in from that directory only the files that have actually been cited,
and insert them into the appropriate bibliography,
without the references needing to be given under the bibliographies as above.
(In fact, any XML already provided will be deleted.)
By default, references will be considered informative; the document attribute
can be used to specify a comma-delimited list of normative references.
Metanorma will issue a warning if any cited reference is not included in the directory. External references do not have to be included in the directory: they will be recognized by comparing their anchors against the external bibliography cache, and referenced as entities or includes. Particular drafts of Internet-Draft documents do still need to be included as separate documents (see Lookup of external references.)
= The Holy Hand Grenade of Antioch Arthur Pendragon :doctype: internet-draft :workgroup: silly :biblio-dir: refs (1) :normative: RFC2119, AsciiDoc (2) [[xyz]] == Hello Hello * a <<RFC2119,2.3 of: See internet draft subsection>> (3) * b <<I-D.abarth-cake>> * b2 <<I-D.abarth-cake,what>> * b1 <<I-D.abarth-cake,2.3 of: See internet draft subsection>> (3) * c <<xyz,format=counter: xyzzy>> (4) * d <<biblio>> (4) * e <<AsciiDoc,AsciiDoctor>> * f <<mathrefs>> [[biblio]] === Biblio See biblio [bibliography] == Normative References (5) [bibliography] == Informative References (6)
The RFC XML references are included in the directory
./refs, with one file per reference. For example, we would expect it to contain a file corresponding to the reference
mathrefs. A file corresponding to
RFC2119is optional, and in fact will be ignored, since the anchor is recognized as an external reference. A file corresponding to
I-D.abarth-cakewill not be ignored, if that file contains a
seriesInfoelement nominating a specific draft version.
The references in the
./refsdirectory are by default considered informative; this attribute indicates that
AsciiDocare to be considered normative.
References are recognized in
relrefas well as
Metanorma-IETF differentiates between bibliographic references and crossreferences to other anchors within the document.
The bibliographic headers need to be provided as above, and its titles are expected to be "Normative References" and "Informative References"; Metanorma will look for those titles specifically in order to insert the references it identifies from the file. However, no XML content is expected to be provided under each heading, and any XML content that is provided will be ignored.
Lookup of external references
In order to speed the lookup of references on the http://xml.resource.org/public/rfc website for external
references, a cache of references is built the first time the gem is run, in the user’s home directory:
~/.asciidoc-rfc-biblio-cache.json. This maps all the canonical anchors for external references as defined
by the IETF, such as
CCITT.E163.1988, to the URLs that their RFC reference is stored on.
References are detected for replacement in the Asciidoc document by matching the
attribute to one of those canonical anchors; the content of the local RFC XML reference is not checked.
(For rebuilding the cache, see Caches.)
Rather than hand crafting RFC XML references for RFC documents, or other references hosted at
you need only create a dummy
<reference> element containing the IETF-defined anchor for that citation. In postprocessing, any
references that are hosted at xml.resource.org will be identified by their anchor, and replaced by entities or XML includes,
for RFC XML v2 and v3 respectively. (The complete list of authoritative
RFC XML bibliographies is available from https://xml2rfc.tools.ietf.org , online and in zipped form.)
Because the content of any externally defined
<reference> element is overwritten with an entity or include,
you do not need to provide a full reference. You can supply a minimal reference like
but note that such a reference is invalid in the RFC XML schema, and the gem will report a missing element during processing.
(The document will still be processed successfully.) To prevent any validation error reports, the minimal syntactically valid reference is:
<reference anchor="RFC2119"> <front> <title/> <author/> <date/> </front> </reference>
If you wish to cite a specific version of an Internet-Draft, you will need to include the
in the reference that identifies the specific version; the anchor is the same for all internet drafts. For example:
<reference anchor="I-D.abarth-cake"> <front> <title/> <author/> <date/> </front> <seriesInfo name="Internet-Draft" value="draft-abarth-cake-00"/> </reference>
As discussed under External Directory, any citations of specific versions of an Internet-Draft need to be included as explicit files in an external directory of RFC XML references, since the seriesInfo draft information cannot be recovered by the anchor. However, any other external references do not require a corresponding directory file (although normative references do still need to be named in the
:normative: document attribute.)
The cache of externally addressable bibliographic information is built from screenscraping the contents of:
The cache of current IETF and IRTF workgroups is built from screenscraping the contents of:
The caches are not rebuilt daily, as the bibliographic cache is with
If you want to refresh the caches,
insert the document attribute
:flush-caches: trueinto the header of the document being processed; or
run the asciidoctor executable with option
-a flush-caches=true(which has the same effect).