W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2001

Re: Schemas Identity Constraint

From: Robyn Dean <rdean@fourbit.com>
Date: Fri, 26 Oct 2001 13:25:10 -0400 (EDT)
To: <xmlschema-dev@w3.org>
FYI, I was able to flag the duplicate name when I validated with XML Spy
v4.0.1. However, when I changed your example to use "key" instead of
"unique", I was no longer able to validate this instance doc.

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	<xsd:element name="Root">
			<xsd:choice minOccurs="0" maxOccurs="unbounded">
				<xsd:element name="Element">
					<xsd:attribute name="name"/>
		<xsd:key name="IdentityContraint1">
		    <xsd:selector xpath=".//*"/>
		    <xsd:field xpath="@name"/>

Received on Friday, 26 October 2001 13:37:28 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:53 UTC