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

Re: newbie question - attributes

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 20 Aug 2002 09:26:33 +0100
To: Bob Schloss <rschloss@us.ibm.com>
Cc: mrbannon@swen.uwaterloo.ca, xmlschema-dev@w3.org
Message-ID: <f5bsn1aey12.fsf@cogsci.ed.ac.uk>

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


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

  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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:04 UTC