![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - schema design for one element, multiple types [Thread Next] Re: schema design for one element, multiple typesTo: xmlschema-dev@--.--- Date: 11/8/2005 9:44:00 PM So, of course, after I read this, I realize that the complexType "foo1" is unnecessarily complicated in the example I gave. This is because I need to add attributes to the "foo" element (i.e. <foo name="foo_name">some_value</foo>) Thanks again, -kevin On Nov 8, 2005, at 11:18 PM, Kevin Y. Kim (Lists) wrote: > > Hi, > > I'm trying to define a schema that will support the following: > > 1 <some_xml> > 2 <foo>some_value</foo> > 3 <foo> > 4 <bar>another_value</bar> > 5 <foo> > 6 <foo>third_value</foo> > 7 </some_xml> > > Now, I know how to defined the schema for each case: > For 2 & 6: > <xsd:complexType name="foo1"> > <xsd:simpleContent> > <xsd:extension type="xsd:string"/> > </xsd:simpleContent> > </xsd:complexType> > > For 3 - 5: > <xsd:complexType name="foo2"> > <xsd:sequence> > <xsd:element name="bar" type="xsd:string"/> > </xsd:sequence> > </xsd:complexType> > > But how would I defined a schema to encompass both? > > Thanks, > -kevin > > > From george@s... Wed Nov 09 07:55:12 2005 Received: from aji.w3.org ([133.27.2 | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
