Re: Closing void elements in HTML5 (writing HTML5 serialized as XML) #HTML5


Radu Coravu
 

Hi Chris,

Indeed probably a simple DITA OT customization plugin cannot override this setting.
You would need a DITA OT plugin which adds a custom XHTML5 transtype which has its own top-level XSLT stylesheet importing the HTML5 one:

<xsl:import ref="plugin:org.dita.html5:xsl/dita2html5Impl.xsl"/>
and then declaring the xsl:output. That's how we do things for our WebHelp responsive output.

Or in the tool which consumes the HTML5 output add some pre-processing stage using an HTML to XHTML convertor like HTMLTidy or Neko HTML.

Regards,
Radu

Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

On 2/23/2020 3:15 AM, Chris Papademetrious wrote:
I don't think xsl:output can be overridden from a plugin. According to the precedence description in section 26 at
https://www.w3.org/TR/xslt-30/#serialization
and the import precedence rules at
https://www.w3.org/TR/xslt-30/#import
the top-level module will always win over the imported modules (I think).
 - Chris

Join main@dita-users.groups.io to automatically receive all group messages.