[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Identity constraint questions

From: <knoaman@ca.ibm.com>
Date: Wed, 21 Nov 2001 12:12:03 -0500
To: xmlschema-dev@w3.org
Message-ID: <OFC73F8715.B3053EAE-ON85256B0B.005E5195@torolab.ibm.com>
Identity constraint questions

Hi,

I have a couple of questions regarding identity constraints. According to
the spec, identity-constraint
definitions are identified by their {name} and {target namespace}, and
those definition identities must
be unique within an XML Schema.

First question:
Does that mean that I cannot have two identity constraints with the same
name within an XML Schema?
(i.e.
    <xs:element name="e1">
         ...
         ...
         ...

         <xs:key name="key1">
             <xs:selector xpath="."/>
             <xs:field xpath="."/>
         </xs:key>
    </xs:element>

    <xs:element name="e2">
         ...
         ...
         ...

         <xs:key name="key1">
             <xs:selector xpath="."/>
             <xs:field xpath="."/>
         </xs:key>
    </xs:element>
)

Second question:
In the section titled 'Schema Component Constraint: Particle Restriction OK
(Elt:Elt -- NameAndTypeOK)', the
following is mentioned:

    For an element declaration particle to be a valid restriction of
another element
    declaration particle all of the following must be true:

    5 R's declaration's {identity-constraint definitions} is a subset of
B's
      declaration's {identity-constraint definitions}, if any.

What exactly is meant by 'subset of'? Does it mean that I need to have the
same identity constraint name
in the derivation as the one in the base?

Your help is much appreciated.

Thanks,

Khaled Noaman
XML Parsers - IBM Toronto Lab
knoaman@ca.ibm.com
Received on Wednesday, 21 November 2001 12:12:00 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.