Re: [xslt] <br></br> empty elements



Peter Robins wrote:
> This is partly a followup to bug 109865. If the bugfix is creating an 
> empty element as suggested, this is surely not correct. See 
> http://www.w3.org/TR/xslt#section-HTML-Output-Method
> 
> "The html output method should not output an end-tag for empty 
> elements. For HTML 4.0, the empty elements are area, base, basefont, 
> br, col, frame, hr, img, input, isindex, link, meta and param. For 
> example, an element written as <br/> or <br></br> in the stylesheet 
> should be output as <br>."
> 
> At least in 1.0.27 that I'm using, <br/> with method=html is creating 
> <br></br>. Both Mozilla and Konqueror, though not Opera, interpret 
> <br></br> as 2 line feeds.
> 
> <br></br> - the postman always rings twice.

Sometimes the postman doesn't ring at all, he just bangs with both fists 
at the door.

   C:\Home\Igor\tmp> xsltproc --version
   Using libxml 20507, libxslt 10030 and libexslt 720

   C:\Home\Igor\tmp> type tmp.xsl
   <?xml version="1.0"?>
   <xsl:stylesheet version="1.0"
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
     <xsl:output method="html"/>
     <xsl:template match="/">
       <br/>
       <br></br>
     </xsl:template>
   </xsl:stylesheet>

   C:\Home\Igor\tmp> type tmp.xml
   <?xml version="1.0"?>
   <doc/>

   C:\Home\Igor\tmp> xsltproc tmp.xsl tmp.xml
   <br><br>

Both cases are transformed correctly, without the closing tag. Where is 
the problem?

Ciao,
Igor




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]