W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2001

Re: Forcing a certain document element

From: Eric van der Vlist <vdv@dyomedea.com>
Date: Fri, 12 Jan 2001 23:54:28 +0100
Message-ID: <3A5F8B24.B1086198@dyomedea.com>
To: xmlschema-dev@w3.org
Robert Braddock wrote:
> 
> > <xsl:element ref="ns:elt/>
> > the element will belong to the namespace prefixed by "ns".
> 
> > <xsl:element name="elt" type="ns:type"/>
> > The element is either from the target namespace of your current schema
> > or unqualified.
> 
> Ah, that's what you meant. That's the reason I'm using global types instead
> of elements--so I can keep the elements unqualified and not have to specify
> every namespace in every instance doc...

It's a design issue that goes beyond the schema itself :=) ...

IMHO, since namespaces are aimed to disambiguate element names, ns1:elt
and ns2:elt should be considered as having a different semantic...

And if you import the definitions using unqualified types, you hide this
since you get similar element names from different namespaces that are
expected to have the same meaning !

Wouldn't it be simpler to use a single namespace then ?

> You can still declare global element(s) using the types, and reference those
> in other schemas when you want to keep the namespace qualification, but if
> the types are all wrapped in element declarations, then there's no option to
> use the second mechanism (which I need).
> 
> I hope people will design with this in mind--especially the W3C.

:=)

Eric

> Robert Braddock

-- 
------------------------------------------------------------------------
Eric van der Vlist       Dyomedea                    http://dyomedea.com
http://xmlfr.org         http://4xt.org              http://ducotede.com
------------------------------------------------------------------------
Received on Friday, 12 January 2001 17:52:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:19 GMT