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

  • To: <xml-dev@l...>
  • Subject: XML schema type question
  • From: "Jeff Greif" <jgreif@a...>
  • Date: Thu, 26 Sep 2002 14:51:57 -0700

I've seen the XML Schema Type Library's "text" type, supporting arbitrary mixed content.  I have been unable to figure out how to define a complex type whose contents are any simple type value or any single element, but not a mixture, where an element of this special type has a certain set of attributes  That is, I'm trying to define
 
<element name="foo">
<complexType >
   ??? some kind of restriction of anyType with either simple or complex content
   <restriction base="anyType">
     ???
     <attribute name="a" ...>
     <attribute name="b" ...>
   </restriction>
  ???
</complexType>
</element>
 
so I can say in instance docs
 
<fooList>
   <foo a="x" b="y" xsi:type="xsd:boolean">true</foo>
   <foo a="xx" b="yy" xsi:type="SomeComplexType">
      <someComplexType>...</someComplexType>
   </foo>
    ...
</fooList>
 
I think I need a disjunction of simpleContent and complexContent but am uncertain how to produce this.
 
Jeff

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