Two nested relations, but one is to itself

A

adimiller

Hi.

I have an XSD which describes a set of objects which one is both
contained in a parent, as well as referencing itself again
(recursively). XSD.exe doesn't like it very much and complains about:

"The same table cannot be the child table in two nested relations."

I have read all over the web about this, which seems to be a limitation
in .Net, but everywhere I read it is regarding an item which is
referenced by two different parents. My problem is a little different
and I was wondering if anyone has a solution.

I have full control over the XSD, but it must be standard (not MS
specific) and compliant.

My XML looks something like this:

<Root>
<Main>
<Name>Service</Name>
<pg>
<pg_name>One</pg_name>
<pg>
<pg_name>One_1</pg_name>
</pg>
</pg>
<pg>
<pg_name>Two</pg_name>
<pg>
<pg_name>Two_1</pg_name>
</pg>
</pg>
</Main>
</Root>

Both Main and pg are the parents of pg.

What XSD can describe this and be .Net friendly?

Thanks
 
N

ng

I can only wonder if it is an absolute necessity to have a nested
relation. If you just need to have a relation, then you could relate
one column in pg to another column in pg. This is done often in SQL
queries that I have written, but you could certainly build this into the
schema. Hope that helps.

T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top