Skip to content
This repository has been archived by the owner on Dec 23, 2019. It is now read-only.

Extract references as entities #80

Closed
opoudjis opened this issue Nov 27, 2017 · 7 comments
Closed

Extract references as entities #80

opoudjis opened this issue Nov 27, 2017 · 7 comments
Assignees

Comments

@opoudjis
Copy link
Contributor

Identity RFC entities and other entities cited with canonical anchors in references, and replace them with entities in the document in post-processing.

@opoudjis opoudjis self-assigned this Nov 27, 2017
@opoudjis
Copy link
Contributor Author

Done. Goes through all recognisable anchor prefixes from xml2rfc cover page (https://xml2rfc.tools.ietf.org) , apart from XSF http://www.xmpp.org/extensions/refs/ , which is offline. Recognises the "miscellaneous" set as a hardcoded array of anchors.

@ronaldtse
Copy link
Contributor

Wonderful! Could I have one more request — the IEEE Bibxml library is very incomplete, so when citing IEEE (and other) documents we want to be able to override the reference with a manual BibXML ENTRY. Would this work?

Currently I have this case for IEEE and Internet-Draft (a draft that is not yet published).

Also, when we cite an Internet-Draft we should be able to also specify the revision. I think this already works.

@opoudjis opoudjis reopened this Nov 28, 2017
@opoudjis
Copy link
Contributor Author

The next step is to snarf the contents of those directories, and only replace references whose anchors are in the published list.

The xml2rfc page claims you can cite drafts, but the links do not resolve. If we don't care, then sure, I can strip out the "draft" and the suffix number when creating the entity. Do you have an example of a document citing a particular version?

@ronaldtse
Copy link
Contributor

@opoudjis I don't think we should care about the contents of those directories because xml2rfc already does this?

Latest I-D cites work if we strip out the "draft-", and per-revision ones need to have "draft-":

wget https://xml2rfc.tools.ietf.org/public/rfc/bibxml-ids/reference.I-D.draft-oscca-cfrg-sm3-00.xml
wget https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.draft-oscca-cfrg-sm3-00.xml

@ronaldtse
Copy link
Contributor

But sometimes yes you need to refer to a particular draft version.

@opoudjis
Copy link
Contributor Author

opoudjis commented Dec 3, 2017

I am now building a cache of reference anchors at ~/.asciidoc-rfc-biblio-cache.json, and I have a document option to clear it (which can also be issued at the command line). Only references actually present in the cache will be overwritten with includes/entities.

@opoudjis
Copy link
Contributor Author

opoudjis commented Dec 3, 2017

Draft citations now work as well. Documented in Readme.

@opoudjis opoudjis closed this as completed Dec 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants