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>

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

Any help would be greatly appreciated.

Thanks
Santosh


__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/
Received on Tuesday, 26 March 2002 20:45:47 GMT

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