Re: Supporting incremental-definition of a type?

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.

And:

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
messages.

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
http://mattwarden.com


This email proudly and graciously contributes to entropy.

Received on Monday, 18 June 2012 15:02:10 UTC