Difference between xsd:key and xsd:unique

后端 未结 5 1174
面向向阳花
面向向阳花 2021-01-04 10:32

What is the difference between using xsd:unique and xsd:key?

5条回答
  •  我在风中等你
    2021-01-04 11:07

    See http://www.w3.org/TR/2004/REC-xmlschema-0-20041028/primer.html#quartelyReport.

    In the example described in the link the "keyRefed" elements are the values of the number attributes of the parts of the zip of the regions and the "keyed" elements are the values of the number attribute of the part of the parts.

    Unique declares that the values must be unique but can be null also, key - that they must be unique. Both types can be references by "keyRefed" elements.

提交回复
热议问题