Altova Mailing List Archives>Archive Index >xml-dev Archive Home >Recent entries >Thread Prev - >Thread Next - RE: [xml-dev] Schema definition of element with optional children Schema definition of element with optional childrenTo: xml-dev@-----.---.--- Date: 5/2/2006 1:44:00 PM Dear All I'm struggling to find the best way to restrict an element that holds address data. If the address is to be deleted it will look like this: <address recordStatus="deleted"/> if it's new or an update it will be along the lines of: <address recordStatus="inserted"> <addressLine1></addressLine1> <addressLine2></addressLine2> <city></city> <postCode></postCode> <country></country> </address> with various fields being optional, these are UK addresses only. What's the most efficient way to declare this using XSD only as I believe I can't say, "if recordStatus = 'deleted' then..." etc? I believe I have to give a choice of two types but this seems tedious? Thanks Joe | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
