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

Re: Redefine?

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 17 Jun 2003 17:07:37 +0100
To: Nigel Hardy <nwh@aber.ac.uk>
Cc: xmlschema-dev@w3.org
Message-ID: <f5b1xxsadrq.fsf@erasmus.inf.ed.ac.uk>

Nigel Hardy <nwh@aber.ac.uk> writes:

> The listing below sets the (simplified) scene. An element "List"
> contains and number of As and Bs. I'm happy with that schema.
> I then want to create an alternative schema with an additional
> identity constraint, viz. a keyref to ensure that all As reference a
> valid B. For the obvious s/w engineering reasons I would like the
> alternative schema to be based on the original (not copied) so I feel
> I should be using redefine. I can't make this work, feel I am swimming
> against a stream and therefore assume that I have got it all wrong
> somewhere. Can I use redefine to add identity constraints? Should I be
> going about this some other way?

You should be able to, but in fact because keys and keyrefs are part
of element declarations, not type definitions, you can't.  Arguably a
design flaw, sorry.

  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 Tuesday, 17 June 2003 12:07:38 UTC

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