Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: optional, but at least one required

From: noah_mendelsohn@--.---.---
To: "Marie Bilde Rasmussen" <mariebilderas@-----.--->
Date: 10/16/2007 3:22:00 PM
Marie Bilde Rasmussen writes:

> I guess some of you will now tell me to use Relax NG instead. 
> Unfortunatley, I don't have that option. So I am not asking for
> an answer or solution,  I would just like to hear some opinions
> on the issues. 

If you're asking: "why did W3C XML Schema adopt the UPA constraint?", I 
can tell you that it was and remains a very contentious issue.  At the 
risk of oversimplifying or perhaps entirely mangling the analysis, some of 
the pros and cons are:

UPA "Advantages": 
a) makes it easier for database-mapping, programming language binding, 
user-interface generation tools, etc. to statically determine what a 
schema will and won't accept.  In certain respects, UPA restricts schemas 
to things that are relatively easier to bind than what you get without 
UPA.
b) makes it easier to apply the deterministic validation algorithms, such 
as those that were used in many XML 1.0 validators

UPA "Disadvantages"
a) as you've seen, makes certain schemas impossible to write, and some 
others difficult to write in a straightforward way
b) confusing to users
c) Technologies like RelaxNG are closed under intersection, union and 
difference.  E.g. you can always write a schema that accepts exactly the 
union of the documents accepted by 2 or more other schemas.  I'm not 100% 
sure, but I'm fairly confident that adopting UPA is at odds with achieving 
such closure.  Closure is desirable for many reasons.  Most obviously, if 
you do a query to retrieve two classes of documents, conforming to S1 and 
S2 respectively, then closure ensures that you can write a schema that 
tightly bounds the results of the query.
d) Seems ugly to some people

As I say, I've probably missed some important points, but it does remain a 
point of active debate.  (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'm just trying to present the pros and cons as I 
understand them.  I do think it's in some ways a tough call.)

Noah





--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------





From noah_mendelsohn@u... Wed Oct 17 02:14:03 2007
Received: from aji.w3.org ([133.27.228.225])
	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