GNOME Bugzilla – Bug 100114
xslt doesn't transform <br /> tags in xhtml-compliant manner
Last modified: 2009-08-15 18:40:50 UTC
Using xslt stylesheets with <br /> tags results in transformed HTML documents with <br> tags, that is, not XHTML-compliant manner. Probably same thing happens to other tags, like <meta>, that have no explicit closing tags.
<br /> in a stylesheet is TOTALLY equivalent to <br/> since a stylesheet is XML, and XML doesn't care or record spaces at that level. If you use method="html" that's completely normal, check the XSLT spec, your bug report is bogus. If you use mthod="xml" then that would be a bug, but I seriously doubt it, then reopen the bug. If you don't understand the answer, please get a Book on XSLT and read about the subject before claiming bug on compliant behaviour. Daniel
Even with method="html" the software should be smart enough to respect user's choice to use xhtml-compliant tags in the output, instead of transforming them into non-xhtml compliant. So if user writes <br /> there is no reason to transform it into <br>. Please note that the compliance was meant only in that sense, not in the sense that the xslt library breaks the XSLT spec. Thank you for the advice to read a book on XSLT :).
I'm very sorry if you can't read the spec. It's not about being smart it's about CONFORMING TO THE STANDARD !!! 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>." If you don't want to read a book at least take the time to read the spec, it's free, it's on-line, you have NO EXCUSE ! Daniel