Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Who supports Schema validation of unique >Thread Next - Re: Who supports Schema validation of unique Re: Who supports Schema validation of uniqueTo: NULL Date: 4/7/2009 9:17:00 AM Chip Grandits wrote: > <xs:unique name="oneCustomerOrdersforEachCustomerID"> > <xs:selector xpath="mstns:customerOrders"/> > <xs:field xpath="@customerID"/> > </xs:unique> > > Now below is a very simple XML instance document that I believe > violates the requirement that Customer IDs be unique for the > CustomerOrders children of the ordersByCustomer element. > > <?xml version="1.0" encoding="utf-8"?> > <ordersByCustomer xmlns="http://tempuri.org/myschema/unique"> > <customerOrders CustomerID="1"> > <item itemID="442"/> > <item itemID="443"/> > </customerOrders> > <customerOrders CustomerID="2"> > <item itemID="444"/> > <item itemID="252"/> > </customerOrders> > <!-- DELIBERATE VIOLATION? repeating CustomerID--> > <customerOrders CustomerID="1"> > <item itemID="282"/> > <item itemID="114"/> > </customerOrders> > </ordersByCustomer> XML is case-sensitive. 'CustomerID' is not the same thing as 'customerID'. -- Waterfall: One Process To Rule Them All | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
