Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Defining recursive elements? >Thread Next - Re: Defining recursive elements? RE: Defining recursive elements?To: "'Todd Moon'" <tmrfcm@-----.--->, <xmlschema-dev@--.---> Date: 5/16/2007 10:52:00 PM No problem. In essence it's: <xs:element name="part"> <xs:complexType> <xs:sequence> <xs:element ref="part" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> (and add the attribute) Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: xmlschema-dev-request@w... > [mailto:xmlschema-dev-request@w...] On Behalf Of Todd Moon > Sent: 16 May 2007 18:55 > To: xmlschema-dev@w... > Subject: Defining recursive elements? > > > I'm not sure if the subject is accurate, but I'm trying to > author an XSD that allows a certain complex type to be nested > within itself to an arbitrary depth. > > A simple example would look like this: > > <?xml version="1.0" encoding="utf-8" ?> > <part serial="00000001234"> > <part serial="00000001234"> > <part serial="00000001234"> > </part> > <part serial="00000001234"> > </part> > <part serial="00000001234"> > <part serial="00000001234"> > </part> > <part serial="00000001234"> > <part serial="00000001234"> > </part> > </part> > </part> > </part> > <part serial="00000001234"> > </part> > </part> > > Any "part" can contain any number of other parts. > > Is it possible to validate this structure without putting an > arbitrary limit on the maximum depth? > > From S.Yona@F... Wed May 16 21:00:05 2007 Received: from aji.w3.org ([133.27.228.225]) by fr | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
