[dsdl-discuss] Re: Namespace Routing Language

From: James Clark <jjc@jclark.com>
Date: Fri Jun 13 2003 - 04:11:57 UTC

> Consider
>
> <namespace ns="http://relaxng.org/ns/structure/1.0"
> xml:base="http://relaxng.org/ns/compatibility/annotations">
> <covers ns="1.0"/>
> <covers ns="1.1"/>
> <covers ns="1.2"/>
> <covers ns="1.3"/>
> <covers ns="1.4"/>
> <covers ns="1.5"/>
> </namespace>
>
> in MNS. How do you rewrite this in NRL? Six <namespace> elements
> having <attach/>?

It depends what the instances can look like. Assuming any particular
instance uses only one of the namespaces, then you would have 6
namespace elements, each with a validate pointing to the same schema.

But what is your schema going to look like? Isn't it bound to be a
<choice> of schemas one for each namespace URI e.g. something like

external "a0.rnc" | ... | external "a5.rnc"
? If not, what would it look like? If so, why would you want to make
such a schema and associate it with a choice of namespaces, rather than
simply associating "a0.rnc" with the 1.0 namespace and so on?

> The biggest problem is that schema authors have to think of a mode
> name. In fact, this is the biggest problem of modes in general. I
> think that we should provide some syntax sugar to ease this burden,
> just like RELAX NG allows an <element> to have a subordinate
> <element>.

That makes sense. I think this is not too hard to accomodate in NRL.
Just allow any element that has a useMode attribute also to have
namespace and anyNamespace children; if they do have such children, it
has the same semantics as using a mode that has a name chosen to be
distinct from all other modes and that extends the mode specified in the
useMode attribute. (If you didn't have extension, then you would would
have either a useMode attribute or namespace/anyNamespace children.)

James

--
DSDL members discussion list
To unsubscribe, please send a message with the
command  "unsubscribe" to dsdl-discuss-request@dsdl.org
(mailto:dsdl-discuss-request@dsdl.org?Subject=unsubscribe)
Received on Fri Jun 13 06:13:09 2003

This archive was generated by hypermail 2.1.8 : Fri Dec 03 2004 - 14:00:27 UTC