Closed opoudjis closed 6 years ago
The current code does not require XSLT 2. If it did, that would be a bug.
https://github.com/reschke/xml2rfc/blob/master/rfc2629.xslt
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0"
Changing the version="2.0"
to "1.0"
, xsltproc accepts the stylesheet without complaint.
... Consider this a bug report. :-)
The 2.0 is there an purpose, it doesn't mean that a 2.0 processor is needed.
What is the actual problem. except for confusing warnings emitted by xsltproc?
@reschke I think there is an issue about BibXML inclusion?
xsltproc, RFC XML v2 entities:
xsl:version: only 1.1 features are supported
error : Unknown IO error
warning: failed to load external entity "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6949.xml"
av2.xml:214: parser error : Failure to process entity RFC6949
&RFC6949;
^
av2.xml:214: parser error : Entity 'RFC6949' not defined
&RFC6949;
xsltproc, RFC XML v3 includes (xsltproc --xinclude rfc2629.xslt a.xml)
error : Unknown IO error
warning: failed to load external entity "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"
a.xml:372: element include: XInclude error : could not load http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml, and no fallback was found
(likely because they are on HTTPS server)
Saxon, RFC XML v2 entities:
Error
Error reported by XML parser processing
file:/Users/nickn/Documents/Arbeit/upwork/ribose/xml2rfc/av2.xml: Scanner State 24 not Recognized
Error reported by XML parser processing file:/Users/nickn/Documents/Arbeit/upwork/ribose/xml2rfc/av2.xml: Scanner State 24 not Recognized
Saxon, RFC XML v3 includes, no parse="text" argument (so parse="xml" default)
Error on line 1 column 50 of reference.RFC.2119.xml:
SXXP0003: Error reported by XML parser: White spaces are required between publicId and systemId.
org.xml.sax.SAXParseException; systemId: http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml; lineNumber: 1; columnNumber: 50; White spaces are required between publicId and systemId.
Btw, I'm not going to be running this on v2; I'd just like to get this working with xi:includes, so I can give you feedback.
Yes, so xsltproc apparently has problems with https resources, and Saxon apparently has trouble with redirects. We should open tickets :-).
xsltproc is a lost cause; from Googling, this issue (or at least a related issue) was raised in 2007, and someone has asked Debian last month to implement a workaround. But xsltproc is frozen, as far as I can tell.
Saxon... ugh. That, at least, could be ticketed. I still suspect that there's something missing in my setup of saxon, and that I don't need to resort to explicitly downloading the resources and setting up a catalog.xml file, to do it.
https://www.greenbytes.de/tech/webdav/rfc2629xslt/rfc2629xslt.html mentions xsltproc as a processing option. The current main stylesheet requires XSLT 2.0, and xsltproc does not process XSLT 1.1. Explicitly say that xsltproc is no longer compatible with the stylesheet.