W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2007

Re: optional, but at least one required

From: Andrew Welch <andrew.j.welch@gmail.com>
Date: Thu, 18 Oct 2007 10:19:51 +0100
Message-ID: <74a894af0710180219r2ba570adi496f7c573a29a3fd@mail.gmail.com>
To: "Boris Kolpackov" <boris@codesynthesis.com>
Cc: noah_mendelsohn@us.ibm.com, "Marie Bilde Rasmussen" <mariebilderas@gmail.com>, "Pete Cordell" <petexmldev@tech-know-ware.com>, "Virginia Wiswell" <vwiswell@verizon.net>, xmlschema-dev@w3.org

On 17/10/2007, Boris Kolpackov <boris@codesynthesis.com> wrote:
> noah_mendelsohn@us.ibm.com <noah_mendelsohn@us.ibm.com> writes:
> > BTW: don't infer from the length of the above lists that I'm against
> > UPA;  I've been in favor of it, and it's sufficiently important to
> > our database implementors among others that I remain in favor.
> I've also noticed that people who struggle with UPA are invariably
> trying to create vocabularies which, while may be more suitable for
> human consumption, are hard to handle in software due to overloading
> of the same markup for multiple purposes.

I'd agree with that - it seems XML designed to be easy to validate
using XML Schema can also be easier to parse and process.  It may
sometimes look like it could be more compact (and perhaps it's wrong
to be thinking about XML Schema when designing your XML) but it works.
 There aren't many guidelines for designing XML (are the any at all?)
but perhaps that's a reasonable guide to follow.

For example, re-writing a co-occurance constraint:

<foo type="a">

<foo type="b">




...makes it possible fully constrain <foo>.  The other benefit is that
if you would normally do some action at the </foo> end element that
depends on the type attribute you have to keep track of it yourself
(in a SAX based model), using the latter approach you can do the
action in the appropriate end element.

Hmm, not the best example but the only one I can think of at the moment :)

Andrew Welch
Kernow: http://kernowforsaxon.sf.net/
Received on Thursday, 18 October 2007 09:26:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:44 UTC