After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 100114 - xslt doesn't transform <br /> tags in xhtml-compliant manner
xslt doesn't transform <br /> tags in xhtml-compliant manner
Status: VERIFIED NOTABUG
Product: libxslt
Classification: Platform
Component: general
unspecified
Other All
: Normal trivial
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on:
Blocks:
 
 
Reported: 2002-12-02 09:32 UTC by mok
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description mok 2002-12-02 09:32:17 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.
Comment 1 Daniel Veillard 2002-12-02 09:49:36 UTC
<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
Comment 2 mok 2002-12-02 21:34:53 UTC
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 :).
Comment 3 Daniel Veillard 2002-12-03 11:57:17 UTC
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