Re: restriction question

Mark Feblowitz wrote:
> Yes - and [the rules governing derivation by restriction in XML
> Schema] simply kills any notion of having layered namespaces
> (defining concepts in ns1 and restricting them in ns2).

There's also been a bit of discussion recently on XML-Dev about
identifying the versions of markup languages through namespaces with
this same notion of "layered namespaces".

"Layered namespaces" occur when there is a recognisable relationship
between two different namespaces such that elements declared in one
namespace are automatically recognised as also being part of another
namespace and applications accept elements from a later version of the
namespace in place of those from an earlier version of the namespace,
for example.

I've previously considered namespaces as being standalone, unrelated
to each other, and regarded the elements:

  <foo xmlns="http://www.example.com/ns1" />

and:

  <foo xmlns="http://www.example.com/ns2" />

as completely different elements rather than "really the same, just
with different namespaces". I still feel that this is the right way of
thinking about it, based on the way that namespaces are defined in
"Namespaces in XML" and used in various other Recommendations, and
that the idea of layering namespaces is misguided, but given that
there seem to be several people whose opinion differs, perhaps I'm
being too dogmatic.

You can already kinda layer namespaces in XML Schema, but only if the
base namespace is no namespace -- if you include a schema with no
target namespace into a schema with a target namespace, then the
components from the included schema are adopted into the target
namespace, but you can't do the same kind of thing when the other
schema does have a (different) target namespace namespace.

So I wonder if the same kind of thing could be done with schemas in
other target namespaces; in other words whether the constraint that
xs:include and xs:redefine must refer to schemas in the same target
namespace (or no namespace) should be lifted.

Alternatively, I wonder whether there could be some kind of "implicit
substitution group" for locally declared elements, such that, in a
restriction, an element in one namespace could be substituted for an
element with the same local name in another namespace.

Any thoughts about whether either of these options would be feasible,
and whether they'd meet the requirements of those who want to layer
namespaces?

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

Received on Wednesday, 24 July 2002 08:32:15 UTC