- From: Eddie Robertsson <erobertsson@allette.com.au>
- Date: Mon, 22 Apr 2002 18:40:27 +1000
- To: Autumn Cuellar <a.cuellar@auckland.ac.nz>
- CC: xmlschema-dev@w3.org
> And can a list element appear in a <complexType> element?
>
> <parameters attribute="value">10 5 5 10</parameters>
>
> Because it has an attribute, it's a complex element, right?
Yes, it is a complexType but this is possible to achieve in two steps.
First define the simpleType for the list type:
<xs:simpleType name="listType">
<xs:list itemType="xs:integer"/>
</xs:simpleType>
Then you can create the complexType with the attribute by extending this
simpleType:
<xs:complexType name="parameterType">
<xs:simpleContent>
<xs:extension base="listType">
<xs:attribute name="attribute" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
Cheers,
/Eddie
>
>
> Autumn
>
> Autumn Cuellar wrote:
> >
> > I have a mixed content element with the character data being a list.
> > Any way to indicate that in XML Schema?
> >
> > Thanks,
> > Autumn
> > --
> > Autumn A. Cuellar
> > Bioengineering Institute
> > The University of Auckland
> > New Zealand
>
> --
> Autumn A. Cuellar
> Bioengineering Institute
> The University of Auckland
> New Zealand
Received on Monday, 22 April 2002 04:28:07 UTC