W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2003

Re: Same Element with different attributes?

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 12 Feb 2003 14:26:23 +0000
To: kim.weit@swipnet.se
Cc: xmlschema-dev@w3.org
Message-ID: <f5by94lfucw.fsf@erasmus.inf.ed.ac.uk>

kim.weit@swipnet.se writes:

> I am thinking about using XML Schema instead of a
> DTD.  I have a simple elementary question about
> the structure of a XML Schema. 
> 
> Is it possible to attach different required attributes
> to the same element depending on where this
> element is cituated in the structure?

Sure - - just use two different local element declarations in the two
different contexts.  See the XML Schema Primer [1].

ht

[1] http://www.w3.org/TR/xmlschema-0/
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                      Half-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 Wednesday, 12 February 2003 09:26:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:36 GMT