W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2000

Re: Providing a value for attributes defined with use="required"

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 30 Nov 2000 12:59:15 +0000
To: Mike_Leditschke@nemmco.com.au
Cc: Gino Basso <GBasso@ware2.com>, xmlschema-dev@w3.org, xmlschema-dev-request@w3.org
Message-ID: <f5b1yvt4nvg.fsf@cogsci.ed.ac.uk>
Mike_Leditschke@nemmco.com.au writes:

> The attribute concerned is part of a versioning scheme. We require
> the attribute to ensure the sender warrants the version of the
> transaction being sent rather than relying on the schema providing
> one. The requirement for a single value is a cross check against the
> namespace specified which indirectly will imply a particular version
> of the transaction.
> I had considered your option but want the generator of the transaction to
> explicitly indicate their intention.

You're right, you can't have what you want just using values of the
'use' and 'value' attributes.  The Primer is misleading in this
case.  Earlier versions of the XML Schema design allowed what you
want, but at some point we went back to doing only what DTDs do in
this regard.

Gino Basso correctly identifies the workaround: define a type with
only one valid member, and declare the attribute with that type and

  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
Received on Thursday, 30 November 2000 07:59:33 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:50 UTC