Altova Mailing List Archives>Archive Index >xml-dev Archive Home >Recent entries >Thread Prev - >Thread Next - Re: [xml-dev] Enforcing use of xsi:type Enforcing use of xsi:typeTo: "Xml-Dev" <xml-dev@-----.---.---> Date: 6/7/2006 12:20:00 PM In the Election Markup Language, people may use a variety of identifiers depending on the type of election, country etc. The schema (XSD) therefore allows use of xsi:type in the instance so that the correct validation can be used for each identifier. I don't think that there is any way in XML Schema of forcing the use of the xsi:type attribute in the instance, so I am currently using Schematron rules to do this. Am I correct, or have I missed something obvious? Before people point out that I am allowing the sender of the message to say what type of identifier they have, the Schematron (which changes for each scenario) also defines the allowed values for xsi:type. I would keep this, but it would be good if the schema itself enforced something as a hint to implementers to look at the spec and see what they need to do. Regards Paul Spencer | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
