W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2001

Schema "can I" question...

From: <MarkH@i2.co.uk>
Date: Wed, 10 Jan 2001 12:50:56 -0000
Message-ID: <1E73B637CFC3D411A12F00B0D0795DDD091499@uknts40exh01.i2.co.uk>
To: xmlschema-dev@w3.org
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.

   <personItem id='e0001'>
    <comment>A software consultant</comment>

   <personItem id='e0002'>
    <comment>W3C Fellow</comment>
   <vehicleItem id='e0003'>
    <comment>Involved in accident</comment>

   <witnessItem id='e0004'>
    <comment>Witnessed in accident</comment>


Mark Hughes
  Agile HTML Editor
Received on Wednesday, 10 January 2001 07:58:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:49 UTC