After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 778192 - Please consider supporting output of <!DOCTYPE html>, with no system ID, if version="5" and method="html" for xsl:output
Please consider supporting output of <!DOCTYPE html>, with no system ID, if v...
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
unspecified
Other Mac OS
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-05 04:29 UTC by Michael(tm) Smith
Modified: 2017-02-07 15:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael(tm) Smith 2017-02-05 04:29:30 UTC
There’s currently not a portable way to get XSLT engines to output <!DOCTYPE html> without any system ID.

I know that the change in bug 747301 made it possible to get systemID-less <!DOCTYPE html> with libxslt+libxml2 if the xsl:output is specified with doctype-system="about:legacy-compat", and that’s great. Unfortunately though, not all XSLT engines support it. For example, Saxon does not.

But Saxon does support another mechanism for generating systemID-less <!DOCTYPE html>. For the details see the Saxon xsl:output docs at http://www.saxonica.com/html/documentation/xsl-elements/output.html, which say:

> version? nmtoken
> … for HTML, the value 5 can be used to force the HTML5 style of DOCTYPE declaration.

So if you feed Saxon a stylesheet with <xsl:output method="html" version="5"> it will output an HTML document with a <!DOCTYPE html> doctype.

Please consider also supporting that convention in libxslt.

Given that xsltproc and Saxon seem to still be the main two command-line XSLT engines that people use, I think users would really welcome having a common way supported in both of those engines to output <!DOCTYPE html>.
Comment 1 Nick Wellnhofer 2017-02-07 15:49:55 UTC
Implemented with the following commit:

https://git.gnome.org/browse/libxslt/commit/?id=5f472f85d074828316ecfa8e5df91e6be4163aeb
Comment 2 Michael(tm) Smith 2017-02-07 15:54:03 UTC
> Implemented with the following commit:

https://git.gnome.org/browse/libxslt/commit/?id=5f472f85d074828316ecfa8e5df91e6be4163aeb

Wow—much thanks!