[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
- From: "Andrew Welch" <andrew.j.welch@gmail.com>
- To: "Paul Hermans" <paul.hermans@amplexor.com>
- Date: Fri, 25 Jul 2008 12:57:54 +0100
> 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]