[dsdl-discuss] Re: Namespace Routing Language

From: James Clark <jjc@jclark.com>
Date: Fri Jun 20 2003 - 02:14:32 UTC

MURATA Makoto wrote:
> Does it make sense to allow <validate/> to borrow the semantics
> of <unwrap/>? For example, <validate schema="xhtml.rng" unwrap="true"/>
> specifies
>
> a new validation candidate be created and validated against the
> the schema xhtml.rng, and
>
> subsequent <attach/> refer to an already-established vaidation candidate
> rather than this newly-created validation candidate.

Interesting suggestion.

One difficulty is attribute sections. It wouldn't be useful if the
validation candidate validated against xhtml.rng consisted of just the
element section to which the <validate> action was applied. There needs
to be the possibility of attribute sections being attached to this
element section. However, <unwrap/> simply discards attribute sections,
so I think there's a reasonable solution. If <validate
schema="xhtml.rng" useMode="x" unwrap="true"/> is applied to an element
section E, then the attribute sections of E are processed in mode X; the
results are added to E and validated against xhtml.rng. The child
sections of E are also processed in mode X and returned as the result of
the <validate/>.

Another complication is the content model for namespace/anyNamespace.
NRL is designed so that the order of the children of
namespace/anyNamespace is not significant. For this reason, at most one
of the children of namespace/anyNamespace is allowed to be of a kind
that may have a non-empty result. At the moment, this constraint is
easy to express: you can have at most one child that is attach or
unwrap. The constraint would become a little complicated: you can have
at most one child that is attach or unwrap or validated with unwrap="true".

I don't think it's desirable to have two ways to do unwrap. Either it
should be a separate element or it should be an attribute (on validate,
allow and perhaps reject as well). I'm not sure which is better at this
  point.

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 20 04:14:54 2003

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