Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Re: Defining recursive elements? >Thread Next - XML Schemas patterns (was: Re: Defining recursive elements?) Re: Defining recursive elements?To: "Todd Moon" <tmrfcm@-----.---> Date: 5/17/2007 4:09:00 PM
On 5/17/07, Todd Moon <tmrfcm@g...> wrote:
>
> Thank you Michael and Shlomo. I didn't know about the ref attribute.
> You saved me a lot of time reading documentation. :)
Well it's a matter of taste, but if you use the venetian blind style
of schema then you wouldn't use element ref="" much, but @type
instead, eg:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="part" type="part"/>
<xs:complexType name="part">
<xs:sequence>
<xs:element name="part" type="part" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="serial" type="xs:string"/>
</xs:complexType>
</xs:schema>
cheers
andrew
From george@o... Thu May 17 14:11:30 2007
Received: from magg | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
