[Home] [By Thread] [By Date] [Recent Entries]


Title: What's wrong w/ nested elements?
XML Schema certainly supports this kind of structure, but from your evidence it looks as if Microsoft's tool to generate an XML Schema doesn't.
 
"Nested relations" - what world do these people inhabit?
 
Michael Kay
 
 


From: Jain, Rajnish [mailto:rjain@x...]
Sent: 07 June 2004 12:36
To: xml-dev@l...
Subject: What's wrong w/ nested elements?

Folks,

The following example shows the same element (b) contained inside elements (a1) and (a2).

<a>
    <a1>
         <b>
           <c></c>
         </b>
    </a1>
    <a2>
         <b>
           <c></c>
         </b>
    </a2>
</a>

When I try to create an XSD for this XML using Microsoft Development Environment 7.1, I get
the following error:

Failed to Create a schema for this data file because:
Although this XML document is well formed, it contains structure that Data View cannot display.
The same table (b) cannot be the child table in two nested relations.

Wondering why the containment relationship shown above is not valid for an XSD? And what can
I do to workaround this problem (I can't afford to name mangle (b) everywhere it appears).

Thanks,
Rajnish Jain

sip:rjain@v...
mailto:rjain@x...
 



Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member