Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Defining recursive elements?

From: "Todd Moon" <tmrfcm@-----.--->
To: xmlschema-dev@--.---
Date: 5/17/2007 5:51:00 AM
Thank you Michael and Shlomo. I didn't know about the ref attribute.
You saved me a lot of time reading documentation. :)

- Todd

On 5/16/07, Michael Kay <mike@s...> wrote:
> 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 andrew.j.welch@g... Thu May 17 14:08:37 2007
Received: from lisa.w3.org ([128.30.52.41])
	by frin


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent