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

Re: variable element names

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 19 Nov 2002 19:13:13 +0000
To: Bob Schloss <rschloss@us.ibm.com>
Cc: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Message-ID: <f5bbs4lid9y.fsf@erasmus.inf.ed.ac.uk>

I think you've identified a bug in Noah's solution.

The processContents attribute of wildcards is not inherited.  So


and writing

<xs:element name="parent">
   <xs:any processContents="strict"/>

in its schema, we would have a requirement that a declaration for the
_var_ element be available.  There's no way to make that requirement

So what you actually want is 

<xs:element name="parent">
   <xs:any processContents="lax"/>

<xs:element name="x" type="..."/>
<xs:element name="y" type="..."/>
<xs:element name="z" type="..."/>

By using 'lax' you avoid the (undesirable for your example)
requirement for a declaration for 'var', but because lax validation
_is_ recursive, and declarations for x, y and z _are_ present,
requires that they conform to those declarations.

  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, 19 November 2002 14:13:15 UTC

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