W3C home > Mailing lists > Public > public-html@w3.org > July 2007

Re: html5 syntax - why not use xml syntax?

From: Ben Boyle <benjamins.boyle@gmail.com>
Date: Sun, 8 Jul 2007 12:33:38 +1000
Message-ID: <5f37426b0707071933i56166763t78972d2959ebf8aa@mail.gmail.com>
To: "Robert Burns" <rob@robburns.com>
Cc: "Mynthon Gmail" <mynthon1@gmail.com>, public-html@w3.org

Thanks.

A follow on question: *should* this be valid in HTML 5?
<input type="radio" name="foo" value="bar" checked="checked"/>


reasons:
- I would like to use the XML syntax, even when authoring/serving HTML
- I would not like authors who have started to use valid XHTML syntax
confused by "validation" errors.

This is a definite challenge for authors learning the differences
between the syntaxes. I would like to eliminate the confusion this
causes, it would enable me to teach and mentor newcomers to HTML
without detailed explanations of language nuances (which are largely
irrelevant to key issues of producing quality content, accessibility
and semantic markup!)

For example, in places I have worked we use HTML but follow (internal
guidelines of) "best practice" like "all tagnames in lowercase, always
quote attributes, nest and close all tags explicitly" etc. We also
deal XML at work (atom, xslt, etc. not necessarily xhtml) and being
able to follow the same syntax at all times is a bonus. Staff turnover
is high and we cannot assure that all staff understand markup to the
degree they could participate in a working group like this. This
doesn't make them bad authors, given time they may yet outstrip our
knowledge ;) It does cause pain if they try to imlement HTML syntax in
any XML documents, and if they use XHTML syntax in HTML and cannot
reliably use the HTML validator. The couple of quirks in HTML syntax
are a small difficultly faced daily. I cannot express how joyous we
would be if this issue were solved by HTML 5 explicitly allowing (not
requiring) that syntax in the HTML serialisation. :)

notes:
- I do not expect HTML with XML syntax to be treated as XML, ever.
HTML is HTML. XHTML is not the same as HTML with XML syntax. That is a
given.
- I do not want to require XML syntax for validity. I support the
abbreviated syntax of HTML, but I would like XHTML syntax in HTML to
be considered (a) valid HTML and (b) conforming HTML.
- I am largely ignorant of the complexity required to implement this,
along with all other requiremends and dependencies, in modern UAs (and
I apologise for that ignorance, but I do listen when those reasons are
explained).

thanks
Ben


On 7/8/07, Robert Burns <rob@robburns.com> wrote:
> Hi Ben,
>
> Looking at your question again:
>
> On Jul 7, 2007, at 6:26 AM, Ben Boyle wrote:
>
> > Isn't it possible to have compatible syntax already?
> > Is there any XHTML syntax that is invalid in a HTML document?
>
> I know of no UAs where there's a problem. Validators may flag it, but
> its probably better to consider it a validator issue than anything
> invalid.
>
> > Do any of these cause problems in HTML? Is this valid?
> > <input type="radio" name="foo" value="bar" checked="checked"/>
>
> Again, no UAs that I'm aware of.
>
> > What about <?xml prolog, @xmlns, @xml:lang?
>
> IIRC, prolog throws IE6 and IE5 into quirks mode. @xmlns:* and
> @xml:lang should likely be ignored as unknown attributes in most UAs.
> Though there's nothing to stop us from adding them in HTML5
> conforming UAs.
>
> > I have noticed the W3C HTML validator is confused by <link ... /> and
> > <meta ... /> empty tags, but had assumed it to be a valiator bug.
>
> I would agree: validator bug.
>
> Take care,
> Rob
>
>
>
Received on Sunday, 8 July 2007 02:33:42 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:46 UTC