[Home] [By Thread] [By Date] [Recent Entries]

  • From: "Andrew Welch" <andrew.j.welch@g...>
  • To: "Paul Hermans" <paul.hermans@a...>
  • 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]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member