W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2012

Re: Supporting incremental-definition of a type?

From: Matt Warden <mwarden@mattwarden.com>
Date: Mon, 18 Jun 2012 10:01:36 -0500
Message-ID: <CADi91UA-VW8od3JkrSmH3kKAp2qBBE+hfM6fVTS18DF+dRpFGw@mail.gmail.com>
To: xmlschema-dev@w3.org
On Mon, Jun 11, 2012 at 5:50 PM, Michael Kay <mike@saxonica.com> wrote:
> I have seen exactly this problem with a couple of my consulting clients, and
> there's no completely straightforward solution.
> The approach of having an abstract schema in which everything is optional
> (minOccurs="0") and then restricting it for specific messages to make
> selected things mandatory certainly seems the right way to think about it.
> The interesting part is then how to implement the restriction process.


On Tue, Jun 12, 2012 at 3:16 AM, Andrew Welch <andrew.j.welch@gmail.com> wrote:
> Instead of validating on Student after page 1, could you validate
> whatever subtypes you have at that point, maybe 'name', 'address' or
> 'id' etc. then only validate <Student> after page 7 ?

Thank you Michael and Andrew for your thoughts. I am leaning toward
taking the view that the "incremental messages" describing student are
not a student itself, but a small subset of specific elements that may
or may not ultimately be capable of describing a student if/when the
other 6 wizard screens are filled out. Therefore, it would be
appropriate to use the subtypes, as Andrew points out, to define these

We will try this approach and see how it works out. I think it brings
up some change management questions as the definition of Student
evolves over time, which would impact the subtype-based messages, even
though it may not be very easy to see that.

If it doesn't work out, we will pursue the technique Michael outlined
around generating the all-optional schema from the main schema. This
is a brilliant idea and handles all the primary maintenance burden
concerns that were floating in my head, and relegates these to
implementation details that we don't even have to think about during
design time.

Thanks for your help,

Matt Warden

This email proudly and graciously contributes to entropy.
Received on Monday, 18 June 2012 15:02:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:16:01 UTC