Re: CSS Namespaces: Need multiple namespaces!

Ian Hickson wrote:

> On Wed, 29 Sep 1999, Peter Linss wrote:
>
> > If you start mixing @namespace declarations with completely foreign
> > namespaces (like xhtml and MathML) then you are in effect declaring
> > equivalence between the namespaces, if that were true, then there
> > shouldn't have been different namespaces to begin with.
> >
> > For example, for me to say:
> > @namespace text url(xhtml) url(MathML);
> > text|foo { color: blue }
> >
> > I'd be implying that a xhtml:foo *is the same kind of element* as a
> > MathML:foo. Which is simply not true, they are distinct entities or
> > they wouldn't be in distinct namespaces.
>
> What, so you mean that _every_ paragraph in _every_ document
> everywhere should be in the same namespace?! You mean that because
> HTML has now got the concept of <p>, I can never invent a DTD with a
> paragraph element?!

No. I'm not saying that. I'm saying that if you invent a XML application which
has "paragraphish" elements, then those are _not_ the same as XHTML's
paragraph elements. If you meant to have XHTML paragraph elements in your
document then you simply insert <html:p> in your document instead of
<ian:paragraph> elements.

> I don't buy that.
>
> It is very likely that one day an HTML document (e.g. a generic web
> page) will have a snippet of ReviewML (e.g., a film review
> incorporated on an IMDb page).
>
> Both are likely to have paragraph-type elements, but that doesn't mean
> they have to have the same namespace!

They also don't have to have the same element name, so if ReviewML calls their
"paragraph-type" elements "foo" then being able to declare both namespaces
with the same prefix still does not allow you to address both elements with
one selector.

>
>
> > This would be the moral equivalent to some declaration like:
> >    @equivalence heading { h1, h2, h3, h4, h5, h6 }
> >    heading { color: blue }
> > rather than saying:
> >    h1, h2, h3, h4, h5, h6 { color: blue }
>
> Yeah, that idea would probably better.
>
> (The syntax needs improving though, as with the above syntax there is
> no easy way of distinguishing between a type selector for elements
> called 'heading' and a type selector for elements in the 'heading'
> equivalence set.)

I wasn't proposing a formal syntax, just an example to illustrate the concept.
Feel free to join in and make this a real proposal... what we need is some
delimiter to distinguish the "equivalence" identifiers. Or this could be
expanded out into a full-fledged macro substitution, or variable system, both
of which have been previously proposed I believe...

>
>
> --
> Ian Hickson
> : Is your JavaScript ready for Nav5 and IE5?
> : Get the latest JavaScript client sniffer at
> : http://developer.netscape.com/docs/examples/javascript/browser_type.html

Received on Thursday, 30 September 1999 18:28:08 UTC