[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Self reference in XML schema?

From: Yang Feng <yfeng@entry.com>
Date: Tue, 11 Jan 2005 16:39:21 -0500
Message-ID: <C4B3048A45903D44BA840FC1BE8BB7BD21C7B0@inside.entry.com>
To: <xmlschema-dev@w3.org>
self reference xml
Hi there,

 

I am new to XML schema. I wonder if I can use self reference in XML
schema. In my XML data, the EMPLOYEE element contains MANAGER element.
MANAGER is also an EMPLOYEE. How can I use XML schema to define this
relationship without repeating the same code for EMPLOYEE and MANAGER
elements?

Is there any sample code? The XML have the following structure:

 

<EMPLOYEE>

            <ID />

            <name />

             <MANAGER>

                        <ID />

                        <name />

            </MANAGER>

</EMPLOYEE>

 

Thanks in advance.

 

Yolande
Received on Wednesday, 12 January 2005 01:18:31 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.