Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: optional, but at least one required

From: "Andrew Welch" <andrew.j.welch@-----.--->
To: "Boris Kolpackov" <boris@-------------.--->
Date: 10/18/2007 11:20:00 AM
On 17/10/2007, Boris Kolpackov <boris@c...> wrote:
>
> noah_mendelsohn@u... <noah_mendelsohn@u...> 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">
  <a/>

<foo type="b">
  <b/>

to:

<foo>
  <typea>
    <a/>

<foo>
  <typeb>
    <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
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

From mike@s... Thu Oct 18 09:40:24 2007
Received: from lisa.w3.org ([128.30.52.41])
	by frink.


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent