XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] XML Schema: Extension and Restriction from a Mixed Complex Type Base Type

>  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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS