RE: [w3c sml] [ISSUE 4684] sml:keyref reference to xs:key/unique

With assistance from Sandy, I think I'm now prepared to make a proposal
on how to allow sml:keyref to refer to xs:key/xs:unique.  See the
attached discussion.   Following discussion and if the proposal is
accepted, I will submit a write up to the editors and provide the
necessary change for the spec.

 

To briefly remind you of why we want to allow sml:keyref to refer to
xs:key/xs:unique:  The possibility exists that existing XML documents
can be used as parts of a new SML model.  That is, the SML model builder
may have to opportunity to build an SML model from documents (schema and
instance documents) that were built without any awareness that they
might have a role to play in an SML model.  The elements in these
document, which the SML model will want to reference in the new model,
may already be defined with xs:keys or xs:uniques.  It seems to be a
wasted exercise to require the SML model builder to essentially
reconstruct the sml:key or sml:unique definitions in the SML model.
Therefore, we should provide the ability of an sml:keyref in the new
model to reference the keys and uniques found in the existing XML
documents that are being referenced by the new model. 

 

As will be obvious from the attached, I owe Sandy credit for the
recommended solution to the problem-a new attribute for specifying the
scope of sml:keyref in the presence of inter-document references.

 

Kirk Wilson, Ph.D.
Research Staff Member

CA Labs

603 823-7146

 

________________________________

From: Wilson, Kirk D 
Sent: Friday, August 24, 2007 3:09 PM
To: public-sml@w3.org
Subject: [w3c sml] [4684] sml:keyref reference to xs:key/unique

 

All,

 

This email will serve to start the discussion of 4684 regarding whether
sml:keyref should be able to reference xs:key/unique elements.  I must
admit that I took this bugzilla because the basic idea presented in the
following paragraph rather interested me.  However, assessing this idea
turned out to be a tremendous undertaking because I don't understand
enough about the background structures being maintained in the PSVI.

 

This is an issue undoubtedly because the current SML spec is silent on
whether sml:keyref can refer to xs:key/unique elements.   I would assert
that there is a powerful reason for allowing this: namely, to allow SML
models to be built from existing models that already have xs:key/unique
structures defined for the elements that need to referenced in the SML
model.  Inter-document references could utilize identity constraints
over existing keys in the referenced documents based on existing keys.
Therefore, I believe that issue here is whether there is anything in XML
Schema preventing this kind of identity constraint.

 

The issue, I believe focuses upon the XML Schema rule that the refer
attribute of xs:keyref should refer to a xs:key/unique element defined
under the same element or under one of that element's children.
Presumably this same rule holds for sml:keyref and sml:key/unique-at
least that is the way I understood an answer I was given when I raised
the question of whether sml ICs must comply with the same structural
restrictions as XSD ICs during the first F2F.  How these tables can
interrelated should be discussed within the WG.  On the other hand, the
refer attribute of sml:keyref is a QName and could presumably identify a
xs:key/unique in another namespace.

 

So, I hope this servers to instigate discussion!

 

Kirk Wilson, Ph.D.
CA Inc.
Research Staff Member, CA Labs
Intellectual Property and Standards
Council of Technical Excellence
W3C Advisory Committee Representative

Tele: + 1 603 823-7146
Fax:   + 1 603 823-7148
<mailto:kirk.wilson@ca.com> 

 

Received on Friday, 7 September 2007 20:37:46 UTC