Hi all,

I'm a little bit confused about what Saxon 9.5.13 does with empty tags (<br/>) if I set <xsl:output method="xhtml"/>

The specifications say:
"If an element that has no children is an XHTML element with an EMPTY content model, the serializer MUST use the minimized tag syntax, for example <br />, as the alternative syntax <br></br> allowed by XML gives uncertain results in many existing user agents."
http://www.w3.org/TR/xslt-xquery-serialization/#xhtml-output

But given this XSLT file

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   version="2.0">
   
    <xsl:output method="xhtml"/>
   
    <xsl:template match="/">
        <html>
            <head></head>
            <body>
                Line 1<br/>Line 2
            </body>
        </html>
    </xsl:template>
   
</xsl:stylesheet>


Saxon gives me

<?xml version="1.0" encoding="UTF-8"?><html>
   <head></head>
   <body>
     
      Line 1
     
      <br></br>
      Line 2
     
     
   </body>
</html>

and that is indeed causing problems, because <br></br> is interpreted as TWO line breaks by Browsers. Is this a bug/wrong specification implementation of Saxon?