Re: Identity-constraint
by Eddie Robertsson other posts by this author
Mar 5 2001 10:34PM messages near this date
Identity-constraint
|
Re: Identity-constraint
"Henry S. Thompson" wrote:
> Correct analysis. Schema _slightly_ buggy -- remember XPath does not
> utilise the default namespace declaration.
Ah, thank you. That was an important piece of information I've completely missed
out on.
Cheers,
/Eddie
> > <?xml version="1.0" encoding="UTF-8"?>
> > <xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
> > elementFormDefault="qualified" targetNamespace="www.allette.com.au/keyref"
> > xmlns="www.allette.com.au/keyref">
>
> xmlns="www.allette.com.au/keyref" xmlns:r="www.allette.com.au/keyref">
>
> > <xsd:element name="Project">
> > <xsd:complexType>
> > <xsd:sequence>
> > <xsd:element ref="Item1" minOccurs="0"/>
> > <xsd:element ref="Item2" minOccurs="0"/>
> > </xsd:sequence>
> > </xsd:complexType>
> > <xsd:key name="Item1Key">
> > <xsd:selector xpath="Item1"/>
>
> <xsd:selector xpath="r:Item1"/>
>
> > <xsd:field xpath="@Item1_2"/>
> > </xsd:key>
> > <xsd:keyref name="Item2_KeyRef" refer="Item1Key">
> > <xsd:selector xpath ="Item2"/>
>
> <xsd:selector xpath ="r:Item2"/>
>
> > <xsd:field xpath ="@Item2_2"/>
> > </xsd:keyref>
> > </xsd:element>
>
> With these changes this validates the example and catches errors if
> you add them.
>
> ht
> --
> Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
> W3C Fellow 1999--2001, part-time member of W3C Team
> 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
> Fax: (44) 131 650-4587, e-mail: ht@[...].uk
> URL: http://www.ltg.ed.ac.uk/~ht/
Thread:
Faroukh Fekravar
Eddie Robertsson
Eddie Robertsson
Faroukh Fekravar
|