Re: MSXML problem with xsd:key and type derivation.

Hi Rick,

> Can someone please verify that the construct below is correct. MSXML
> 4.0 produces an error when validating with a key on a field that has
> been defined as a complexType with simpleContent. I assume this is a
> bug in MSXML as the Xerces and XSV parsers do not complain.

Actually, I think that MSXML might be correct here. Clause 3 of
Validation Rule: Identity-constraint Satisfied
(http://www.w3.org/TR/xmlschema-1/#cvc-identity-constraint) states:

  For each node in the ·target node set· all of the {fields}, with
  that node as the context node, evaluate to either an empty node-set
  or a node-set with exactly one member, **which must have a simple
  type**. (my emphasis)

There is a little wiggle room here, possibly, because of the switch
from the XPath data model ('nodes') to the XML Schema data model
('information items'), but it seems fairly clear.

I agree that it would be more helpful if it also allowed complex types
with simple content. It would be worth forwarding that as a suggestion
to www-xml-schema-comments@w3.org, as it doesn't seem to be on their
list of comments so far.
  
Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

Received on Wednesday, 1 May 2002 05:22:17 UTC