W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2001

Recursive element definition

From: Stefan Panek <spanek@siebel.com>
Date: Mon, 28 May 2001 04:41:05 -0400 (EDT)
Message-ID: <CF932A784A88D111BCEC00805FC7F2B201956E81@carrera.siebel.com>
To: xmlschema-dev@w3.org
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:element ref="CATEGORY">
<xsd:element ref="PART"/>
<xsd:attribute name="NAME" type="xsd:string" use="required"/>
<xsd:attribute name="SEQ" type="xsd:integer" use="required"/>

Can anyone verify that or has a tip for me ?
Received on Monday, 11 June 2001 05:33:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:51 UTC