W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2003

Re: Can field be simpleContent in identity constraint?

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 07 Feb 2003 09:15:21 +0000
To: rainerbecker.mail@t-online.de (Rainer Becker)
Cc: xmlschema-dev@w3.org
Message-ID: <f5b7kcc78pi.fsf@erasmus.inf.ed.ac.uk>

rainerbecker.mail@t-online.de (Rainer Becker) writes:

> Hello newsgroup readers,
> this question is about identity constraints. The Spec says
> 3.11.4 Identity-constraint Definition Validation Rules
> Validation Rule: Identity-constraint Satisfied
> ........
> 4 [Definition:]  Call the subset of the Ětarget node setĚ
> for which all the {fields} evaluate to a node-set with
> exactly one member which is an element or attribute node
> with a simple type the qualified node set.
> That means, that a field can either be an attribute or
> a simple type element. But the following instance validates
> just fine in XSV, XMLSPY5, and MSXML, although the field is
> a simple content element. Does the above definition include
> simpleContent? Please clarify...

Your document is valid.  Two <Buch> elements, two distinct ID fields.
What's the problem?

If I edit your instance so both of the ID fields are identical, then
XSV raises an error:

<Liste xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

  <invalid char="4" code="cvc-identity-constraint.2.1.2" line="7"
    resource="file:///amd/nfs/rhymer.cogsci.ed.ac.uk/export/ltg/users/ht/xml/xmlschema/monk/buch.xml">duplicate key 1 for {None}UNIQUE_Buch, first appearance was in unnamed entity at line 3 char 4 of file:///amd/nfs/rhymer.cogsci.ed.ac.uk/export/ltg/users/ht/xml/xmlschema/monk/buch.xml</invalid>

  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                      Half-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Friday, 7 February 2003 04:15:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:09 UTC