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

Re: choice for attributes?

From: Jeni Tennison <jeni@jenitennison.com>
Date: Thu, 24 Jan 2002 10:54:46 +0000
Message-ID: <60330142750.20020124105446@jenitennison.com>
To: xmlschema-dev@w3.org
CC: Scot Nielsen <scotnielsen@yahoo.co.uk>, Eddie Robertsson <eddie@allette.com.au>
Eddie Robertson wrote:
> Scot Nielsen wrote:
>> Can we then assume that many schema rules and constraints are
>> validated solely by the parser and not the schema.xsd? For example an
>> <element> declaration must have either a type or ref attribute but not
>> both. I can find no constraint in schema.xsd to enforce this so it
>> must be the parser right?
>
> That's correct. Most schema processors won't actually use the
> XMLSchema.xsd schema to validate the schema you pass to it. Instead it
> will have a built in schema structure that gets used for validation.

Just to expand a bit on this... it's also true that the schema for
schemas can't represent all the constraints that are actually present
on XML representations of schemas. In the XML Schema Structures Rec
there are a whole series of "Schema Representation Constraints" which
are all about those constraints that can't be articulated in XML
Schema.

For example, "Schema Representation Constraint: Element Declaration
Representation OK" includes things like:

  "default and fixed must not both be present."
  "One of ref or name must be present, but not both."

which are essentially choices between attributes.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Thursday, 24 January 2002 05:54:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:26 GMT