- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Wed, 08 Jan 2003 13:53:19 -0500
- To: "Peter Foti (PeterF)" <PeterF@SystolicNetworks.com>
- cc: "'Ian Hickson'" <ian@hixie.ch>, "'www-html@w3.org'" <www-html@w3.org>
> For example, if I send an XHTML document that contains elements like > <h1>,<p>,<strong>, etc., do I need to define CSS styles for each of those > objects, or will agents use their default HTML styles? Depends on whether they claim support for XHTML or not. If they do, they will typically provide a UA sheet that does something sane. > Well, considering that XML is the hot new technology This phrasing is very much at the heart of _so_ many problems... just because it is "hot" does not mean it has universal applicability, as many people seem to think. > The same people who are currently teaching HTML (the Educational system). > Currently, a lot of schools will teach HTML instead of XHTML. They should > update their focus. Have you considered trying to get them to? Since they tend to use IE/Windows as their browser, they can't very well switch to XHTML (and they don't teach validation, typically, so they would be switching to tag-soup-XHTML). > Ok, then how about this: > <p> My lousy paragraph <br> stinks! > > Should that be interpretted as: > <p> My lousy paragraph </p><br> stinks! > > or as: > <p> My lousy paragraph <br> stinks!</p> > > Where in the spec is this ambiguity made clear? http://www.w3.org/TR/html401/struct/text.html#h-9.3.1 says: <!ELEMENT P - O (%inline;)* -- paragraph --> And clicking on "%inline;" tells us (http://www.w3.org/TR/html401/sgml/dtd.html#inline): <!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;"> clicking on "%special;" (http://www.w3.org/TR/html401/sgml/dtd.html#special): <!ENTITY % special "A | IMG | OBJECT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO"> So <p> is allowed to contain <br> and hence <br> does not close out <p>. hence the correct interpretation is the seconf one. No ambiguity. > My primary argument is that users developing pages intended to be served as > text/html should write those documents in XHTML so they can take advantage of > the HTML handling of existing agents, while moving one step closer to being > able to produce XML documents for the web. I think Ian's argument is that this is _not_ a step closer to being able to produce such documents, but a step further away, since it lets the author develop authoring habits which will backfire once the switch to XHTML as XML is attempted. If the author's first introduction to XHTML is as XML, however, such bad habits do not get a chance to form, making the transition to XML easier in many ways. Boris -- There is no distinctly American criminal class except Congress. -- Mark Twain
Received on Wednesday, 8 January 2003 13:58:42 UTC