Re: [comment] Mixed Content Model

nchen wrote:
> 
> In the schema spec, it says "1.2.4  If the {content type} is element-only or
> mixed, the sequence of the element information item's element information
> item [children], if any, taken in order, is schema-valid with respect to the
> {content type}'s particle, as defined in Element Sequence Valid (Particle)
> (§3.8)"(  http://www.w3.org/TR/xmlschema-1/#Complex_Type_Definition_details)
> .
> 
> So how do we represent <!ELEMENT P (#PCDATA|a|b|c)> in schema?! The order
> and number of child elements are not constrained in XML 1.0

I believe you are mistaken. That syntax is not legal in XML 1.0.
There is a similar syntax that has the property that the
order and number of children are not constrained:

	<!ELEMENT P (#PCDATA|a|b|c)*>

(note the *).

This has a straightforward analog in XML Schema:

 <element name='P'>
  <complexType content='mixed'>
   <choice minOccurs='0' maxOccurs='unbounded'>
    <element ref='t:a'/>
    <element ref='t:b'/>
    <element ref='t:c'/>
   </choice>
  </complexType>
 </element>

>, and therefore
> many industry users have already used this model in their documents. How can
> they easily migrate these documents to schema? Or should we suggest them
> using DTDs for old documents but using schema when create new documents?
> 
> All the best,
> Ninggang
> 
> webMethods, Inc.
> Ph : 703-460-2510
> Fax: 703-460-2599
> URL: http://www.webMethods.com

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/

Received on Friday, 12 May 2000 18:24:44 UTC