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

Re: re-using the same element at different levels?

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 19 Nov 2002 21:31:46 +0000
To: "Ron Alexander" <Ralexander@musiciansfriend.com>
Cc: xmlschema-dev@w3.org
Message-ID: <f5b8yzpgsal.fsf@erasmus.inf.ed.ac.uk>

"Ron Alexander" <Ralexander@musiciansfriend.com> writes:

> Does xsd allow me to reuse an element? I need ShipInfo for an order
> and also for an individual item. Say we have an item that is on
> backorder, when it comes into stock we may ship it at a higher
> priority than the rest of the order was shipped at.

Sure, that's what <xs:element ref='ShipInfo'/> is for.  Declare it at
the top level, ref it from as many content models as you like.

  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 16:31:48 UTC

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