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

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
use='require'.

ht
-- 
  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