Closed martinthomson closed 4 years ago
So the generated HTML would just have a link to the CSS?
The main issue here is that the details of CSS classes are not standardized yet, so it's really not possible to replace the CSS and keep it possible to develop it further...
And yes, it's a goal to align with the class names used by xml2rfc, so CSS becomes interchangeable, but we're not there yet.
Thanks Julian, this is awesome. I'll try it out.
Note that it requires XSLT 2 (XSLT 1 can only read external XML).
Yeah, I just hit that. I'm stuck on xsltproc which can't handle this. Is it possible to take the value of the parameter as the CSS contents? As in rather than
xsltproc --stringparam xml2rfc-ext-css style.css ...
I could do
xsltproc --stringparam xml2rfc-ext-css "$(cat style.css)" ...
That should be possible.
Try https://github.com/reschke/xml2rfc/commit/79db07377dff05d59ac49544c7a106db9b963b03 and the parameter "xml2rfc-ext-css-contents".
That worked brilliantly. Thanks!
You're welcome. Please keep in mind though that class names may not be stable.
If you have CSS changes that you believe should go into the builtin CSS, by all means let me know.
I need to spend some time refining the stylesheet, but I think that I would ultimately want to propose something akin to what I'm using for the python xml2rfc (see QUIC for an example of that).
The python xml2rfc offers a
--css
option that it reads and uses to provide CSS for the output HTML. This would be a very useful facility for me as I don't find that the default stylesheet meets my needs.