Re: Another possible compromise re namespaces in HTML

On Fri, 27 Nov 2009 09:23:19 GMT, David Carlisle wrote:
>>  "Tab Atkins Jr." Wed, Nov 25, 2009 at 8:53 AM in reply to David:
>>> The html5 parser special cases unprefixed svg and mathml elements
>>> (only) so unless I misunderstand what you meant above then these two
>>> items are contradictory. There are no "standard prefixes" for svg and
>>> mathml, if you want to make an xhtml document work also in the html
>>> serialisation then redefining the default namespace is the only option
>>> supported by the curent draft.
>> 
>>    I believe he is referring to the 'common' prefixes used for svg and
>>    mathml in xml - "svg" and "math".  I don't believe the use of
>>    "standard" was intended to refer to the HTML5 standard.
>
> Perhaps, but I still don't understand it. Whatever is meant by
> "standard", the proposal appears to be that HTML5 predefines a prefix
> for SVG and MathML (which then must be used unprefixed) and that
> furthermore the unprefixed mathml or svg elements must not use the
> xmlns="..." declaration, so it is not possible to make the same fragment
> work in both html and xhtml serialisations.

It would be good if Toby explained. However, I think you misread his 
proposal.

Under Toby's point 1), then by "The default xmlns attribute cannot be 
bound to anything other than the HTML namespace", I assume he referred 
to "outside foreign content" - that is: inside native HTML content. 

Then, under point 2) he first says that "SVG, XML, HTML itself) do not 
have to be declared". Which means that they MAY be declared. Obviously, 
here he talks about the default namespaces that HTML 5 documents 
supports - <svg>

He then in the next second half of that sentence switches to talking 
about prefixes for these "out-of-the-box" namespaces. He suggests 
restricting the possible prefixes to those prefixes that HTML 5 syntax 
spec allows [to be read: those prefixes that HTML 5 will at some point 
specify]. Eg. <svg:element>

The link between <svg> and <svg:element> in that sentence, is that 
neither of them need to be declared whether with xmlns="svgURI" or with 
xmlns:svg="svgURI". However, it is to be understood, that you MAY 
declare both of them. 

Toby's proposal at this point simply reflects Rob's proposal [1], which 
does operate with "standard" prefixes.  The way Toby's proposal differs 
from Rob's proposal, is by limiting the "standard" prefixes - and 
prefixes in general - to those namespaces that HTML supports "out of 
the box". Whereas Rob's proposal includes operating with a central 
namespace prefix registry for *any* namespace prefix. 

However, I assume that one would, in Toby's proposal as well, operate 
with a central registry - which could be HTML 5 itself - limited to 
cover the prefixes connected with the "out-of-the-box" namespaces.  

> I'm not sure why you say math is a common prefix for mathml, I'm not
> sure that I've ever seen it. Unprefixed use is by far the most common,
> followed I would guess by mml: and m:.

Both in Rob's proposal and in Toby's proposal, then "mml" and "m" could 
be registered as prefixes for MathML. In Roby's proposal, you or 
someone will have to register them, if you want to use them (someone 
could reach the mill before you ...). While in Toby's proposal you are 
guaranteed that the default prefixes will be registered for the 
out-of-the-box namespaces. 

Rob's proposal is also open towards unregistered prefixes, including - 
and excluding - their xmlns:*="..." declarations - the only problem 
with such prefixes is that the validator will complain more about those 
than about the registered namespace prefixes.

Toby's proposal is more occupied with making those namespaces that we 
actually get, work as namespaces already do, in XML.

[1] http://lists.w3.org/Archives/Public/public-html/2009Nov/0616

-- 
leif halvard silli

Received on Monday, 30 November 2009 01:30:56 UTC