Re: CSS Namespaces: Need multiple namespaces!

Ian Hickson wrote:
> 
> On Thu, 30 Sep 1999, Chris Lilley wrote:
> > So you have made namespace declarations be an exact analogue of
> > doctype declarations, which already exist, and removed the ability
> > to identify which vocabularies are being combined in a given
> > document.

> The problem with DOCTYPEs is that they can only appear once in a
> document. 

Agreed they can; which means, DOCTYPE is a declaration aboutthe document
as a whole. That in itself is not a problem; but the fact that
transparent and natural usage of nuliple namespaces is not possible in
DTDs, to which DOCTYPES refer, is a problem.

> The ability of identifying which vocabularies are used in a
> document is done by the xmlns attribute(s), which can appear as often
> as required.

Yes. So, if a document uses five namespaces, you have at least five
occurences of a namespace declaration - you may have more, with some
namespace declarations occuring in multiple places.

>  The content of these attributes is an arbitrary unique
> string. This string uniquely identifies a namespace. 

Agreed.

> Each namespace
> can have a Schema (just like each FPI has a DTD).

Uh, no. It might identify (or be used to lookup, with the namespace URI
as a key) some component which contributes to the overall schema for a
document.

The document, taken as a whole, should have a single schema against
which the entire document can be validated.

> So just like the <!DOCTYPE> points to the DTD, it makes sense for the
> xmlns= to point to the Schema.
> 
> No?

No. Otherwise, as I said, you made the namespace declaration be an exact
analoge to the DOCTYPE - each one points to a single schema for a single
namespace - and now, how to combine them? How to assert content models
that span namespaces?

> If this is not the case, then what _is_ the difference between
> namespace declarations and doctypes?

Doctype points to a single, non-namespace-aware DTD. 
Whatever item is used to bind to the XSchema points to a single,
namespace-aware XSchema
Namespace declarations don't necessarily point to anything, but use URLs
so that they don't need a cetralised registry.

I would expect the XSchema to also use namespaces to show how the
different namespaces are being combined in this particular Schema.

> (Note -- I make two assumptions which may be flawed: 1. Schemas are
> basically souped up DTDs,

Correct. And the souping up which concerns us here is the ability to
deal with multiple namespaces, and to allow vaklidation in the presence
of multiple namespaces; and thus, to declare the content model of each
element, whose allowed children may come from multiple namespaces.

>  and 2. each namespace will only have one
> Schema. Are these assumptions correct?)

The second one is not.

Consider the case where you define some namespace foo, and years later I
declare some other namespace bar, and also define a Schema that combines
them the way I like. How could your foo namespace possibly know in
advance:

- the names of elements in the bar namespace
- where to allow them, in the content model of foo elements

Namespaces are like spare parts, and Schemas are like blueprints. Given
some 2x4 timber, nails, and angle brackets (three namespaces) there is
more than one way to combine them; each possible wooden object has its
own blueprint (a Schema).

--
Chris

Received on Sunday, 10 October 1999 15:06:57 UTC