|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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@c... > URL: http://www.ltg.ed.ac.uk/~ht/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








