Daniel Pitts said:
Are you sure that's not valid HTML? XML is a subset of SGML, and I
would think that <shortForm /> was valid SGML as well. <br /> is
valid HTML.
It is (part of) valid HTML, because HTML, as an SGML application, has
the SHORTTAG feature enabled
(<URL:
http://www.w3.org/TR/html401/sgml/sgmldecl.html>, notice
"SHORTTAG YES").
However, what it means is probably not what you think it means.
Using shorttag notation, these two paragraphs are equivalent:
<p>this is a test</p>
<p/this is a test/
Writing <p/> means that the closing ">" is not part of the tag,
but part of the text content! Luckily no widely used browser
understands shorttags on element.
<URL:
http://www.w3.org/TR/html401/appendix/notes.html#h-B.3.7>
I'm actually not sure you can use shorttag with "br" elements, as
they are empty and can have no end tag. I guess the validator could
tell, but I'll just avoid it.
It's called deprecation. Tell your users that they need the latest
browsers to see your site. I know that isn't always possible, but you
can say at a certain point that you're no longer supporting Mosaic and
Netscape 3
Yes. This problem should be over when we no longer have to support IE 6.
Or is it a problem for IE 7 too?
(there is a proper solution for IE though,
Because you gain so much with using XHTML, including the fact that
many popular JavaScript libraries require XHTML-strict to work
properly.
Javascript libraries work with the DOM structure. They don't care
about the syntax of the page markup. That's entirely up to the browser
to parse.
I you were right, and since IE 6 understands XHTML as malformed HTML
anyway, then those libraries shouldn't work IE6 anyway.
If they use Ajax to request further content, then it's fine to send
XML, but it doesn't have to be XHTML at all, and probably shouldn't.
A lot of JavaScript won't work with properly sent XHTML, because using
an XML parser precludes using the document.write feature.
Next you're going to tell me that you shouldn't use CSS.
Well, IE 6 still doesn't support most of CSS2, which has been a
standard since 1997. If you need to support IE6, and you do, then
you'll have to make it work with only the supported subset.
/L