- From: Jeff Rafter <jeffrafter@definedweb.com>
- Date: Mon, 11 Jun 2001 09:25:21 -0700
- To: <xmlschema-dev@w3.org>
Stefan, This is okay and happens quite often. The thing you want to make sure of is that the particle is emptiable-- meaning you don't want to force the definition to be infinite (which you haven't done). For example if you set the minOccurs of CATEGORY to 1 this structure would go on recursively indefinitely. http://www.w3.org/TR/xmlschema-1/#cos-group-emptiable Good luck, Jeff Rafter Defined Systems http://www.defined.net XML Development and Developer Web Hosting ----- Original Message ----- From: "Stefan Panek" <spanek@siebel.com> To: <xmlschema-dev@w3.org> Sent: Monday, May 28, 2001 1:41 AM Subject: Recursive element definition > Hi there, > I trying to solve the following problem: > I want define a elemet CATEGORY. > As a category can contain sub-categories the element itself is used again as > "child"-element in the "parent"-element. > I tried the following Schema-definition. But is looks somehow strange to me: > <xsd:element name="CATEGORY"> > <xsd:complexType> > <xsd:sequence> > <xsd:element ref="CATEGORY"> > <xsd:element ref="PART"/> > </xsd:sequence> > <xsd:attribute name="NAME" type="xsd:string" use="required"/> > <xsd:attribute name="SEQ" type="xsd:integer" use="required"/> > </xsd:complexType> > </xsd:element> > > Can anyone verify that or has a tip for me ? > Thx. > Stefan > >
Received on Monday, 11 June 2001 12:25:44 UTC