Geoff;
But still, strictly speaking, an
XML based document is bound to be more semantically correct because it is
well formed.

Why? Are the semantics of the following deferent?

<ul>
        <li>Ice cream</li>
        <li>Sprinkles</li>
</ul>
...
<ul>
        <li>Ice cream
        <li>Sprinkles
</ul>

"SGML and XML are metalanguage facilities for defining markup languages. Markup languages defined by SGML and XML declare formal features for syntax, but have no mechanisms for formally expressing semantics."
http://xml.coverpages.org/semantics.html


ASFAIK the semantics of both HTML4.01 and XHTML1.0 are described here: <http://www.w3.org/TR/html401/>. e.g.
"A heading element briefly describes the topic of the section it introduces."
http://www.w3.org/TR/1999/REC-html401-19991224/struct/global.html#h -7.5.5


"XHTML is designed to be as much like HTML as possible. It has the same 'semantics' as HTML"
http://www.westciv.com/style_master/house/good_oil/xhtml/



This means that the CSS can be applied without fear of the
parser misunderstanding where a declaration could have finished. There is
no possibility of any guess work in xhtml as it is well formed.


This may or may not be an obvious problem. But I would not be surprised to
see complex designs misrendered when transformed from xhtml to html4 with
all optional ending tags taken out.


Why would you want to take them out?

What I am saying is that with XHTML the designers knows this won't happen,
given the correctness of the parser.



You appear to be saying that CSS is not compatible with HTML4 because HTML parsers can only "guess" at its structure if optional end tags are not used and therefore parsers are likely to render CSS rules incorrectly even though the document may be valid. I assume that what you mean by "guess" is: Apply error correcting algorithms to ambiguous markup.

Does this correctly summarise what you are saying ?

Now go into the area of accessibility, how are you going to tell all sorts
of user agents and devices the full semantic meaning of the markup. What
about when aural.css becomes mature? Will complex document in HTML4 be as
exact as those following XML syntax?


Yes, if you write it against the DTD and follow accessibility
guidelines. There is no difference between the semantics or the
accessibility of HTML4.1 and XHTML1.0.

You may be right, but I don't agree. It's only a small difference, but it
is there.



Where is this difference defined, is there a term for it?


In my view, you cannot fully mark up
documents with a trusted explicit semantic fullness without and XML
definition. The border here might be small, but it's small enough for one
definition to allow for best of interpretation and the other an
explicit
interpretation.

Well-formedness has nothing to do with semantics.


You're missing the point. Closing tags is being completely accurate with
punctuation, where markup is the punctuation. Not closing tags CAN lead to
ambiguity. In XHTML there is no syntax ambiguity, in HTML4 there are
possibilities. It may not happen when validating against the doctype. That
is not the problem. The problem is the CSS container, it's boundaries are
often not certain.

If you think you need this "punctuation" then use it. I've stated before, optional end tags are optional, use them to your heart's content (most people do).


However absent optional end tags are implied - closed by the following or enclosing block as defined here <http://www.w3.org/TR/REC-html40/intro/sgmltut.html#h-3.2.1> and elsewhere. If you have written HTML well, there is no ambiguity and no guessing is required by conforming HTML parsers. Valid, well written HTML is not tag soup.

It's probably worth naming the elements in question: HTML, HEAD, BODY, P, LI, DT, DD, OPTION, COLGROUP, THEAD, TFOOT, TBODY, TR, TH, TD. Four of those elements have optional Start Tags as well as optional End Tags (and go straight to punctuation hell presumably :).

To see how your browser's parser handles a TBODY element with an omitted Start Tag and an omitted End Tag point it here. (you need a browser with DOM scripting to see its parsed code - latest IE, Moz, Safari Op should be fine) <http://www.webx.com.au/code/tbodycount/>

For good measure I've applied a background colour (baby blue) to this element (the one with no start tag or end tag) using CSS.

Lucky guess or just applying rules defined by HTML4?

Except for the reasons give by Peter Ottrey the only technical reason
for using XHTML is that you need the XML (this being the only technical
difference between HTML4.1 and XHTML 1.0 ). Any other reason simply
comes done to a matter of personal preference.

I don't agree with that.

" This is the same as HTML 4 Strict except for changes due to the differences between XML and SGML."
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
aslo
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd


I'm not trying (or want) to be the poster boy for HTML, or even recommend you to use it, but please don't derided it with spurious argument. ASFAIK the W3C still offers both HTML and XHTML equally and does not diminish one in favour of the other.

There are good reasons to use XHTML. If you are able generate XML, XML it's useful. I don't understand why HTML has to be considered harmful before you can see the pros and cons of XHTML or visa versa.


Chris.

******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************



Reply via email to