Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Database schema from standards xsd

From: noah_mendelsohn@--.---.---
To: Boris Kolpackov <boris@-------------.--->
Date: 4/3/2008 2:29:00 PM
Boris Kolpackov writes:

> There are ways to specify in XML Schema whether elements should appear
> in a particular order or not (xs:sequence vs xs:all).

I'm afraid that's not correct.  Specifying "the sequence A, B, C" means 
that only the elements A, B and C are allowed, and only in that order. 
Specifying "all of A, B, C" does NOT necessarily mean order does not 
matter.  It merely means that all of the following are acceptable 
instances:

A B C
A C B
B A C
B C A
C A B
C B A

It is perfectly reasonable for an application to assign a different 
meaning to A B C than to C B A.  In such a case, a database mapping that 
failed to retain the order would result in bugs.  The schema workgroup at 
one point considered a request from the XML Query workgroup for a standard 
annotation that would indicate whether order was significant, but as we 
got closer to refining the specification, the Query workgroup indicated 
that their interest had diminished and the feature was dropped.

In general, the order of XML elements is significant regardless of what 
the schema says.  Sometimes, as with the sequence above, the correct order 
can be inferred from the schema, and so in principle need not be 
separately tracked on a per-instance basis.  Ironically, it is in the 
"all" case that the database is likely to have to track the order per 
instance.  Also, as Mike says, there are many obvious cases involving 
repeating elements in which order matters.

Noah

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





From mike@s... Fri Apr 04 02:27:17 2008
Received: from aji.w3.org ([133.27.228.225])
	by fri


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