Re: [Moderator Action] How to define an element which must have a value?

Jingkun Hu <hujingkun@yahoo.com> writes:

> I roughly searched the archive of xmlschema-dev. And I
> didn't find a solution to how to define an element
> which must have a valid value. For example, <element
> name="birth-date" type="date">, here if a valid value
> is required (null is not accepted for this element),
> how to specify it? 
> 
> Can I say it nullable="false" by adding an attribute?
> if not what are the other ways?

I'm not sure I understand the question.  'nullable' is false by
default, so for simpleTypes (such as 'date') which do not allow the
empty string, valid instances of elements declared as having such
types, as in your example above, _must_ have valid content to be
valid.

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 Friday, 15 December 2000 04:49:43 UTC