Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re:

From: "Rschloss" <rschloss@--.---.--->
To: "Xmlschema-dev" <xmlschema-dev@--.--->
Date: 7/30/2004 4:34:00 AM
> 
> Every time I think I've got the XML schema keys and keyrefs, they
> baffle me again. 
> 

I recognize the symptoms. My rule of thumb is:

if you have a rule that every E within the same Y must have a unique K,
(e.g. every "city" within the same "country" must have a unique "code") then
define the xs:key within the definition of Y, with a selector that selects E
from Y, and a field that selects K from E.

if you have a rule that every R within Y must have values of (I,J,K) that
match the values of (A,B,C) on some S within the same Y, (e.g. every
"manager" within a "division" must have the same ("first name", "last name")
as some "employee" within the same "division") then define a keyref within
the definition of Y with a selector that selects R from Y, and fields that
select I, J, and K from R.

The one that requires a clearer head than I have this morning is where the
scope of the keys is different from the scope of the keyrefs...

Michael Kay

From rschloss@u...  Fri Jul 30 09:34:47 2004
Re


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