- From: <knoaman@ca.ibm.com>
- Date: Wed, 21 Nov 2001 12:12:03 -0500
- To: xmlschema-dev@w3.org
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 UTC