[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XML Schema: Extension and Restriction from a Mixed Complex
> This is fine for instance elements such as: > <a xml:lang="en">abcdefg</a> > > But in one case I need to have following model: > <a> > <b>2008-12-12</b> > <c>2008-12-14</c> <!-- optional --> > </a> Instead of extending a text only type to allow elements, you might find it better to restrict a type that allows elements to only allow text. In 1.1 you can just define two separate types, 1 for each variation, and then switch between them using xs:alternative (available now in Saxon SA) http://ajwelch.blogspot.com/2008/07/validating-co-constrains-in-xml-schema.html -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
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
|