AW: XMLSpy and recursive schemas

Hi Mahesh, 

completing your Schema in a simple manner to find out behaviour 
of my XMLSpy, i dont get any problems building an XML instance
with such a snippet inside: 

<sections>
 <section name="a" baseAddress="a">
	<description/>
	<repetitions/>
	   <section name="b" baseAddress="b">
		<description/>
		<repetitions/>
		 	<section name="c" baseAddress="c">
				<description/>
				<repetitions/>
				<register/>
			</section>
	   </section>
 </section>
</sections>

Beside the fact, that XMLSpy offers me all elements (including section) at any point
of the instance which is not allowed (but a really old XMLSpy problem..;o)..), XMLSpy 
complains if i try to build an unvalid instance. 

Maybe you're trying to use a feature, which is only available in a special
version, i'm using XMLSpy 4.4

Regards

Jens

*************************************************
Jens-Christian Pohl
T-Systems GEI GmbH
Systems Integration
Projektbereich eSolutions
22339 Hamburg Germany
*************************************************


-----Ursprüngliche Nachricht-----
Von: URSEKAR,MAHESH (Non-HP-Spain,ex2)
[mailto:mahesh.ursekar@non.hp.com]
Gesendet am: Montag, 1. Juli 2002 12:50
An: xmlschema-dev@w3.org
Betreff: XMLSpy and recursive schemas





Hi!

I created the a schema that uses recurison using XML Spy. Here is the small
snippet that is giving me problems:

	<xs:element name="sections">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="section"
maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="section">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="description"/>
				<xs:element ref="repetitions"
minOccurs="0"/>
				<xs:choice>
					<xs:element ref="section"
maxOccurs="unbounded"/>
					<xs:element ref="register"
maxOccurs="unbounded"/>
				</xs:choice>
			</xs:sequence>
			<xs:attribute ref="name" use="required"/>
			<xs:attribute ref="baseAddress" use="required"/>
		</xs:complexType>
	</xs:element>

Using XML Spy, I tried to create an XML document based on the above schema
and end up with the following problem: 

When I reach the "sections" element, XML Spy shows me the "section" element
as a sub-element. But the "section" element (which uses recursion) does not
show me any sub-children.  

I believe XML schemas support recursion. In that case, is this a limitation
with XMLSpy??

Any help would be welcome as this is a blocking problem in my current work!!

Thanks, Mahesh

Received on Monday, 1 July 2002 07:58:17 UTC