Robert Burns wrote:
> What problems would an author face with actual browsers if they
> authored valid and well-formed XHTML 1.0 that also adhered to the
> appendix C guidelines and then delivered that content as text/html? I
> cannot think of any and I've yet to hear any issues presented (Note that
> adhering to appendix C means there's no CData sections and <script> is
> always closed with </script>).
http://www.w3.org/TR/xhtml1/guidelines.html doesn't say anything about
not using CDATA sections.
It does say "Use external style sheets if your style sheet uses < or &
or ]]> or --. Use external scripts if your script uses < or & or ]]> or
--" but it doesn't indicate that code like:
<script type="text/javascript">
<![CDATA[
alert("Hello world");
]]>
</script>
is a JS syntax error in text/html, nor that
<script type="text/javascript">
if (5 &gt; 2) alert('OK');
</script>
is a syntax error too.
XHTML code like:
<textarea>
Text</textarea>
in Firefox results in "Text" on the second line of the text area. (Opera
and Safari disagree. I think XHTML5 agrees with Firefox). When you send
that as text/html, the leading newline will be ignored, so you will get
data loss when submitting the form.
The checked, disabled, readonly, etc attributes can't be used at all in
a document that follows Appendix C's advice to work in old UAs.
(I expect there are plenty of other issues - it seems it would be hard
to write something like Appendix C that is actually correct.)
--
Philip Taylor
philip@zaynar.demon.co.uk