metanorma / asciidoctor-rfc

AsciiRFC: an AsciiDoc/asciidoctor backend to produce RFC XML v3 (RFC 7991) and v2 (RFC 7749)
BSD 2-Clause "Simplified" License
15 stars 7 forks source link

Add xml-stylesheet `rfc2629.xslt` #88

Closed ronaldtse closed 6 years ago

ronaldtse commented 6 years ago

When you open an I-D in the browser on the IETF site, it will use the rfc2629.xslt file to transform it into HTML.

e.g., https://tools.ietf.org/id/draft-irtf-cfrg-ocb-07.xml

However, our drafts only give out straight XML when you browse them:

e.g., https://tools.ietf.org/id/draft-ribose-cfrg-sm4-07.xml

The reason is that our XML files are missing this line:

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

Header of first file:

<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

Header of our file:

<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
]>
opoudjis commented 6 years ago

We already have an option to include the XSLT sheet in the XML output, by adding the document attribute :rfc2629xslt: true. I've set that to false by default; does this mean it should be true by default?

ronaldtse commented 6 years ago

Wow I totally missed that. Yes let’s make that a default please!