[whatwg] Namespaces and tag names in the HTML parser
Peter Occil
poccil14 at gmail.com
Thu Aug 1 14:22:36 PDT 2013
- "Let the current column be the first col element child of the colgroup
element" is
not considered ambiguous because the "colgroup element" mentioned is
understood
to be "the colgroup element in question" (see the beginning of the step: "If
the current
element is a colgroup, follow these substeps:"). On the other hand, the
phrase
"While the node is a so-and-so element, etc." (and the patterns mentioned in
my
earlier message) is ambiguous because it is not known beforehand what kind
of element
is involved. (Also, ambiguity issues involving "the first col element
child" are moot
because, as far as I can tell, an element named "col" in a namespace other
than HTML
can't be a direct child of an HTML "colgroup" element.)
- The tree construction stage is more generic than other HTML algorithms
with respect
to namespaces, while most of the rest of the spec deals exclusively with the
HTML
namespace, making confusion much less likely.
--Peter
-----Original Message-----
From: Ian Hickson
Sent: Thursday, August 01, 2013 4:41 PM
To: Peter Occil
Cc: WHATWG
Subject: Re: Namespaces and tag names in the HTML parser
On Thu, 1 Aug 2013, Peter Occil wrote:
>
> Sec. 12.2.4 (Tokenization) [...]
I mean not in what is today section 12.
For example, where the spec says "Let the current column be the first col
element child of the colgroup element". Why is that not ambiguous?
Right at the top of the spec it says "Except where otherwise stated, all
elements defined or mentioned in this specification are in the HTML
namespace ("http://www.w3.org/1999/xhtml"), and all attributes defined or
mentioned in this specification have no namespace.". What I'm confused
about is why this is enough for part of the spec, but not other parts of
the spec.
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list