- From: Ayalew Kassahun <A.Kassahun@InfoRay.NL>
- Date: Mon, 12 Feb 2001 14:02:51 +0100
- To: xmlschema-dev@w3.org
- Cc: xmlschema-dev@w3.org
Thnaks Jeff, I think you are write that the only way of specifying unnamed sub elements is the <any> element in the schema. But I think this is a series shortcoming in the present schema. Does anyone out there know if this is an issue for the next schema spec. regards, Ayalew > -----Original Message----- > From: Jeff Rafter [mailto:jeffrafter@definedweb.com] > Sent: Monday, February 05, 2001 7:24 PM > To: Ayalew Kassahun > Cc: xmlschema-dev@w3.org > Subject: Re: C type array and struct > > > Ayalew, > > > <xsd:complexType name="MyClass"> > > <xsd:sequence> > > <xsd:element type="MyElement" maxOccurs="unbounded"/> > > <xsd:sequence> > > <xsd:attribute name="length" type="xsd:int"> > > </xsd:complexType> > > In order to have the<xsd:element> tag you must provide a name > or a ref [1]. > The only other way I could suggest otherwise, is to utilize an "<any>" > element instead of an "<element>" element. Then you could > still constrain > the occurences without a specific name. > > > The number of elements is given by the 'length' attribute. > > I don't think this is possible in this version of XML Schemas > (though I may > stand correction). I think that you would have to apply this > later in the > application. In general this is a rule based approach-- in > XML Schemas you > cannot constrain an element's declaration through an instance > attribute > (except maybe xsi:type). > > [1] http://www.w3.org/TR/xmlschema-1/#declare-element (section 1.3) > > Good Luck, > Jeff Rafter > Defined Systems > http://www.defined.net > >
Received on Monday, 12 February 2001 07:49:55 UTC