Re: newbie question - attributes

Bob Schloss <rschloss@us.ibm.com> writes:

<snip/>

> A schema validator will not check that the content of an attribute matches
> the constraints specified unless it knows that the element on which the
> attribute appears has a content model that needs to be checked, and that
> model calls for that particular attribute, or a class of attributes, to be
> checked.

I beg to differ.  Lax validation, which is what may ensue when a
validator has no declaration for the document element, uses the
Ur-type repeatedly.  This includes an attribute wildcard, which in
turn means that if a top-level declaration for a ns-qualified
attribute is available, it will be enforced.

XSV implements this, but since it doesn't implement boolean, no error
is reported with the example as given.  Change the definition of
test:data_item to xsd:decimal, and XSV detects the error, since it
_does_ implement decimal.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2002, 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/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]

Received on Tuesday, 20 August 2002 04:26:38 UTC