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

recursive relationship in XML schema

From: santy subramanian <santysemail@yahoo.com>
Date: Tue, 26 Mar 2002 17:45:46 -0800 (PST)
Message-ID: <20020327014546.40679.qmail@web20905.mail.yahoo.com>
To: xmlschema-dev@w3.org
XML skill level - Beginner

Is it possible to define a XML schema that allows for
the following –

A company can be made up department or employees.
There must be at least one department or at least one
employee in the company and a department must have at
least one employee.

The XML schema in effect must be able to allow for the
following - 
<company name=“ABC Company”>
     <employee name=”John Doe”/>

<company name=”ABC Company”>
    <department name=”IT Division”>
	<department name=”IT New Development”>
		<employee name=”John Doe”/>
	<department name=”IT Maintenance”>
		<employee name=”Jane Smith”/>

Any help would be greatly appreciated.


Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
Received on Tuesday, 26 March 2002 20:45:47 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:55 UTC