-
Notifications
You must be signed in to change notification settings - Fork 4
Using xml2rfc citations libraries
One of really nice features of xml2rfc are the citation libraries that can be readily used in the XML source of an RFC or I-D. YANG-I-D provides template files and XSLT stylesheets that further simplify the process of including citations and referencing them in the text.
However, all this broke down when the IETF migrated all web sites to https
: libxml2 doesn't support TLS (and probably never will), so it is unable to resolve external entities with https://...
URLs. Fortunately, there is a simple workaround that also enables off-line use of the citation libraries.
The citation libraries can be downloaded (and later refreshed) using rsync:
rsync -av xml2rfc.ietf.org::xml2rfc.bibxml /usr/local/share/xml2rfc
In this example, the citations will be stored under /usr/local/share/xml2rfc
, but any other directory can be used instead.
Create the catalog file with the following contents and store it in the "root" directory where the citation libraries reside (/usr/local/share/xml2rfc
):
<?xml version="1.0" encoding="utf-8"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<!-- XML Catalog file for xml2rfc citations -->
<rewriteURI
uriStartString="https://xml2rfc.tools.ietf.org/public/rfc/"
rewritePrefix="./"/>
<rewriteSystem
systemIdStartString="https://xml2rfc.tools.ietf.org/public/rfc/"
rewritePrefix="./"/>
</catalog>
Most Linux distributions use /etc/xml/catalog
as the system XML catalog. Just append the following entry to this file:
<nextCatalog catalog="file:///usr/local/share/xml2rfc/catalog.xml"/>
Again, modify the catalog
attribute so as to refer to the actual location of the new catalog file.