I’m transforming an XML document with mimimized br tags like this:
<br/>
I’m using Saxon 9, and outputting as XHTML
<xsl:output method="xhtml" indent="yes" use-character-maps="html-chars"/>
I was under the impression from the docs that when using XSLT the serializer must use minimised tag endings (if the tag body is empty, which it is), however I always get this in my output:
<br></br>
Any clues as to why this should be the case, and how I can force it to output in minimized form:
<br/>
The output method
xhtmlwill output any empty XHTML elements in the minimized way, meaning any elements likebrthat are in the XHTML namespacehttp://www.w3.org/1999/xhtml. So without seeing more details I would guess that you havebrresult elements that are in no namespace or a different namespace. In that case the output method does not require any minimized syntax.