Hi David,
I looked briefly at your schema, but I'll have to admit that its size
daunted me. :) But here's what I suspect is happening.
The constraint "Validation Rule: Identity-constraint Satisfied" of 3.11.4
of the schema structures spec [*] states, in part:
[[
4.3 If the
{identity-constraint category}
is keyref, then for each member of the
�qualified node set�
(call this the keyref member), there must be a
�node table�
associated with the
{referenced key}
in the
[identity-constraint table]
of the element information item (see
Identity-constraint Table (�3.11.5),
which must be understood as logically prior to this clause of this
constraint, below) and there must be an entry in that table whose
�key-sequence�
is equal to the keyref member's
�key-sequence�
member for member, as defined by
Equal
in
[XML Schemas: Datatypes].
]]
Translated into the vernacular, this means that, in the instance document,
the instance of the <key> that the <keyref> matches must be an information
item that is a descendant (or the same as) the element containing the
keyref.
Probably because of the difficulty in parsing the above--exacerbated by an
error in the original Schema Primer--not all schema processing software
came to this conclusion. There's been an erratum correcting the Primer for
a long time now, so, if this is in fact what's happening, it does point to
a problem with your instance (or, more probably, with the placement of the
keyref in your schema).
Hope that helps,
Neil
[*]: http://www.w3.org/TR/xmlschema-1/#cvc-identity-constraint
Neil Graham
XML Parser Development
IBM Toronto Lab
Phone: 905-413-3519, T/L 969-3519
E-mail: [EMAIL PROTECTED]
|---------+---------------------------->
| | [EMAIL PROTECTED]|
| | nmobil.com |
| | |
| | 08/13/2003 10:17 |
| | AM |
| | Please respond to|
| | xerces-j-user |
| | |
|---------+---------------------------->
>---------------------------------------------------------------------------------------------------------------------------------------------|
|
|
| To: [EMAIL PROTECTED]
|
| cc:
|
| Subject: keys and keyrefs - more
|
|
|
|
|
>---------------------------------------------------------------------------------------------------------------------------------------------|
Hi all,
I found that we were mixing cases in the keyref tag, sometimes saying
keyref, other times keyRef. But correcting this did not make a difference
to Xerces. I'm attaching the schema and a sample file it should validate
against.
(See attached file: eda_pvt_schema_3.xsd)(See attached file:
GoFar_A1_Lab_Report_mod.xml)
Thanks much,
David Shontz
ExxonMobil Exploration UTC
Application Support/Application and Data Integration
CORP-RR-603
281-654-7214
Email: David Shontz/U-Houston/ExxonMobil
Internet Email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
#### eda_pvt_schema_3.xsd has been removed from this note on August 14 2003
by Neil Graham
#### GoFar_A1_Lab_Report_mod.xml has been removed from this note on August
14 2003 by Neil Graham
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]