W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2002

Re: multiple attributes help.

From: Cyrill Zadra <czadra@bluewin.ch>
Date: 13 Nov 2002 13:10:30 +0100
Message-ID: <3DD24136.7070907@bluewin.ch>
To: xmlschema-dev@w3c.org

Hi Reshma,

As far as I know is it possible, but I've not yet a lot of xml-schema 
knowledge now. I would use attributeGroup & refer, when you need the 
same attribute for other elements.

Cyrill

reshma@intelesoftech.com wrote:
> Hello all,
> Is it possible to have multiple attributes for an element as follows.
> 
> <xsd:element name="product" type="ProductType"/>
>   <xsd:complexType name="ProductType">
>     <xsd:sequence>
>       <xsd:element name="number" type="xsd:integer"/>
>       <xsd:element name="size" type="xsd:integer"/>
>     </xsd:sequence>
>     <xsd:attribute name="effDate" type="xsd:date"/>
>     <xsd:attribute name="effTime" type="xsd:time"/>
>   </xsd:complexType>
> </xsd:element>
> 
> Is the above example is right or should I define a attributeGroup & refer 
> it?
> 
Received on Wednesday, 13 November 2002 07:17:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:35 GMT