Schema "can I" question...

As my customization of schemas posting has mustered no response, I'll focus
on the critical aspect and ask...

1) Can I allow arbitrary (i.e. unanticipated) elements in a <sequence>?
2) Alongside other specified elements?

For example (see below), can I write a schema that explicitly describes
<personItem> and <vehicleItem> (and would validate that instances of these
items complied with the schema's type definition for them), while also
allowing <witnessItem> which does not appear in the schema?

Note: <items> is a collection of zero or more items from a range of possible
types which represent entities (people, vehicles, buildings etc.) which have
different properties (firstName, lastName etc.).

I want to define a basic schema structure, but allow people to include their
own types without having to modify the schema. Validation would trap misuse
of the anticipated types but simple not check anything in an items section
that wasn't explicitly defined.

<myDocument>
 <items>
   <personItem id='e0001'>
    <comment>A software consultant</comment>
    <firstName>Mark</firstName>
    <lastName>Hughes</lastName>
   </item>

   <personItem id='e0002'>
    <comment>W3C Fellow</comment>
    <firstName>Henry</firstName>
    <lastName>Thompson</lastName>
   </item>
 
   <vehicleItem id='e0003'>
    <comment>Involved in accident</comment>
    <make>Ford</make>
    <color>Red</color>
   </vehicleItem>

   <witnessItem id='e0004'>
    <comment>Witnessed in accident</comment>
    <make>Ford</make>
    <color>Red</color>
   </vehicleItem>
 </items>
</myDocument> 

Thanks

Mark
--
Mark Hughes
  Agile HTML Editor
    http://www.agilic.com

Received on Wednesday, 10 January 2001 07:58:04 UTC