[dsdl-discuss] Re: Overlaying schema expressions

From: Eric van der Vlist <vdv@dyomedea.com>
Date: Thu May 27 2004 - 14:23:10 UTC

On Thu, 2004-05-27 at 16:08, G. Ken Holman wrote:
> Hello all!
>
> I tried to spark a discussion on XML-Dev regarding overlaying schema
> expressions "on top of" normative schema expressions from other organizations:
>
> http://lists.xml.org/archives/xml-dev/200405/msg00313.html
>
> ... but no-one was interested in taking the bait and talking more about this.
>
> I'm curious what people here think about this.
>
> If an organization publishes a normative W3C Schema expression for a
> document model, and I want to create a restricted subset whose instances
> validate against the original document model, I feel I can keep the
> namespace of the original vocabulary and just write a secondary set of
> constraints that would be applied to a given document before or after, but
> always in conjunction with, the normative schema expression.
>
> Does this sit well with people, or is the act of creating a new document
> model (the subset) obligating me to come up with a new namespace?
>
> I don't want a new namespace because stylesheets and other processing
> applications are namespace-sensitive and should be working with the subset
> since an instance of the subset is an instance of the big schema.
>
> Mechanically, I know I can do it, and in my post noted above I suggest
> doing it either (1) with a relaxed set of non-typed elements and attributes
> that solely validate the structure and used in conjunction with the
> normative schema, or (2) with a rigourous set of typed constraints working
> standalone and mimicking the normative schema but not being "official".
>
> My gut feel is (1) is more politically palatable, non-threatening to the
> original schema, and truer to the sense of "an additional set of
> constraints developed by an outside organization for users of a particular
> application or profile of a published normative schema maintained under the
> auspices of its original owner".
>
> But (2) is more technically palatable to tools such as editing tools that
> are (understandably) designed to constrain information to a single
> expression of constraints instead of combining multiple expressions of
> constraints.
>
> I'm leaning towards (1) and I'm curious what others have to say about
> this. A big reason why (1) appeals to me is that I may have numerous
> profiles and subsets I can describe with numerous non-typed
> hierarchy-only-checking expressions, not having to worry about content data
> types as I can just rely on the normative schema to provide the validation
> of those aspects of the instance.

I think that you have given a good summary of the situation :) ...

I'd add that using solution (2) is riskier than (1) (except when using
W3C XML Schema but I'll come back to that later) because you can
erroneously provide an alternative schema that isn't really a
restriction of the original one.

With WXS, you can derive the original schema by restriction. That's very
verbose but that gives you a guarantee that what you provide a
restricted schema and people use it that way, for instance with XML
Signature or encryption which are schemas that needs to be customised.

Since this feature is specific to W3C XML Schema, a good practise with
other schema languages would be to use DSDL Part 10 to validate against
both the original and the "expected restriction" when you want to be
strict.

A feature that would be nice would be a tool able to say if a schema B
is a restriction of a schema A, but that's another story!

I *guess* that with two RELAX NG schemas, James' derivative method could
be adapted to compute the derivation between two schemas, but that far
too complex for me (at least for the moment)...

My 0.02 Euros,

Eric

-- 
Rendez-vous à Paris (Web Services Convention).
                                                http://masl.to?C12E25728
Upcoming XML schema languages tutorial:
 - Portland   -half day-   (27/07/2004)        http://masl.to/?E6ED13728
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------
--
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 Thu May 27 16:23:11 2004

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