Jump to content

Circular References Inside a Schema


dornad

Recommended Posts

Hi,I need help with a XMLBeans based App that I'm developing for a client. My client right now stores his info in someXML's which he currently uses in a .NET based App :<company>

<division>

<manager/>

<email/>

<subdivisions>

<division>

...

</division>

<division>

...

</division>

</subdivisions>

</division>

<division>

...

</division>

...

</company>I'm trying to create a XSD for that structure, however I'm stuck with the division reference inside the subdivisions. Is there any way to support this "circular" reference in XSD ?

Link to post
Share on other sites

Yes. Define the contents of the devision element separately and in the subdevision element, allow only:

<xs:element ref="devision" minOccurs="1" maxOccurs="unbounded"/>

In other words, you'll be defining an element that calls itself.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...