Hi,
I am using RadControls for ASP.NET AJAX Q2 2009 (2009.2.826.35). We would like to have the output be valid XHTML 1.0 Transitional when the Design tab is used. When using the "InsertTable" tool button, there are two ways I can generate invalid XHTML, and I was wondering if there is any way to prevent this invalid XHTML from being generated. The two ways I can generate invalid XHTML are:
1) When you insert a new table using the "Table wizard" feature, and accept the default settings, you get the following HTML inserted into the editor:
If you then validate this markup against any of the XHTML standards, it fails validation, due to the presence of the empty <thead></thead> element. Is there some way to suppress this <thead> element if it is not being populated with content?
2) If you enter some content and then hit enter to move to a new line, a new <p></p> element is inserted. If you then insert a table by just directly selecting the table size from the grid in the pop-up that appears when the "Insert Table" button is clicked (i.e. without using the table wizard), the following markup is generated:
This markup fails XHTML validation because apparently a <table> element cannot be contained within a <p> tag. (i.e., if I manually change the containing <p> tag to a <div>, the fragment is XHTML valid). Is there any way in the Design interface to prevent a <table> tag from being inserted into a <p> tag? Our users will likely follow the steps I detailed above and thus insert a <table> element into a <p> tag, and we would like to prevent this if possible.
Thank you very much for your assistance.
Joe Alfano
I am using RadControls for ASP.NET AJAX Q2 2009 (2009.2.826.35). We would like to have the output be valid XHTML 1.0 Transitional when the Design tab is used. When using the "InsertTable" tool button, there are two ways I can generate invalid XHTML, and I was wondering if there is any way to prevent this invalid XHTML from being generated. The two ways I can generate invalid XHTML are:
1) When you insert a new table using the "Table wizard" feature, and accept the default settings, you get the following HTML inserted into the editor:
| <table> |
| <thead> |
| </thead> |
| <tbody> |
| <tr> |
| <td> </td> |
| <td> </td> |
| </tr> |
| <tr> |
| <td> </td> |
| <td> </td> |
| </tr> |
| </tbody> |
| </table> |
If you then validate this markup against any of the XHTML standards, it fails validation, due to the presence of the empty <thead></thead> element. Is there some way to suppress this <thead> element if it is not being populated with content?
2) If you enter some content and then hit enter to move to a new line, a new <p></p> element is inserted. If you then insert a table by just directly selecting the table size from the grid in the pop-up that appears when the "Insert Table" button is clicked (i.e. without using the table wizard), the following markup is generated:
| <p> |
| <table> |
| <tbody> |
| <tr> |
| <td> </td> |
| <td> </td> |
| </tr> |
| <tr> |
| <td> </td> |
| <td> </td> |
| </tr> |
| </tbody> |
| </table> |
| </p> |
This markup fails XHTML validation because apparently a <table> element cannot be contained within a <p> tag. (i.e., if I manually change the containing <p> tag to a <div>, the fragment is XHTML valid). Is there any way in the Design interface to prevent a <table> tag from being inserted into a <p> tag? Our users will likely follow the steps I detailed above and thus insert a <table> element into a <p> tag, and we would like to prevent this if possible.
Thank you very much for your assistance.
Joe Alfano
