According to HTML 4†, HTML5‡, and all the browsers I have tested* (including 
Firefox, IE7/8/9, Chrome, Safari, Opera, Android, iOS):
- No <table> should be without a <tbody>. 

- No <tr> should exist outside of a <thead>, <tfoot>, and <tbody>. 

- The first <tr> encountered in a <table>, if not within a <thead> or <tfoot>, 
and if no <tbody> was manually defined, implies that a <tbody> element was 
just created as well (as the parent of this and all subsequest <tr>s). 

LibXML, however, seems happy to parse <tr> elements as if they were direct 
children of a table. 
This is simply wrong, nonstandard, and incompatible with user agents. 

It is creating a headache for me because CSS / XPath selections will  not act 
as expected, and in an asymmetrical way with regards to actual users' browsers.

Can we get this to be considered a bug? 

After all, it’s not that the document author declared there was no 
tbody. Wittingly or no, they implied its presence; LibXML is simply failing to 
make the correct inference.

Thanks,
Alan Hogan
alanhogan<at>gmail


† http://www.w3.org/TR/html4/struct/tables.html#h-11.2.1http://dev.w3.org/html5/markup/tbody.html
* http://jsfiddle.net/SDAw6/1/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to