bartverstraete77@hotmail.com (Bart V) writes:
[color=blue]
> If I try to load a xml schema in a dataset I get this error:
> The 'CDSKey1' identity constraint is not declated. An error occurred
> at file:///C:/Doc.../CDLib.xsd, (36, 4).
>
> Here is the schema:
>
> <?xml version="1.0" standalone="yes" ?>
> <xsd:schema id="CDLib" targetNamespace="CDLib" xmlns=""
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">[/color]
.. . .[color=blue]
> <xsd:keyref name="CDArt" refer="CDSKey1">
> <xsd:selector xpath=".//Art" />
> <xsd:field xpath="CDID" />
> </xsd:keyref>[/color]
Like all names declared in a schema, CDSKey1 is declared in your
target namespace, so you need a proper qualified name to refer to it.
So add xmlns:cdl="CDLib" to your xsd:schema element, and change your
xsd:keyref to say refer="cdl:CDSKey1"
You will also need to change all your XPaths to use this prefix as
well, or none of them will match.
ht
--
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@inf.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]