Error in example in section 5.1 of the Primer

There is an error in the example of section 5.1 of the Primer (entitled "A
Unique Composed Value"):

<unique name="dummy1">
  <selector xpath="r:regions/r:zip"/>
  <field    xpath="@code"/>
  <field    xpath="r:part/@number"/>
 </unique>

The rules of identity constraints say that the field xpath should only
return one node for each node selected by the selector [1]. In this case, an
r:zip can contain many r:parts, each with their own number attribute.  This
violates the rule.

I don't think there's a valid way to express what the example is trying to
enforce.

Thanks,
Priscilla

[1] http://www.w3.org/TR/xmlschema-1/#cvc-identity-constraint

-----------------------------------------------------------
Priscilla Walmsley                   priscilla@walmsley.com
Vitria Technology                     http://www.vitria.com
Author, Definitive XML Schema    (Prentice Hall, Dec. 2001)
-----------------------------------------------------------

Received on Wednesday, 17 October 2001 15:38:31 UTC