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

How to define an element with attribute

From: Wang K H <khong.hai.wang@gridnode.com>
Date: Fri, 30 Mar 2001 13:47:23 +0800
Message-ID: <001b01c0b8dc$e521fe20$b9d5a8c0@gridnode.com>
To: <xmlschema-dev@w3.org>
Hi all,

I am new to schema and is trying to write a schema. Please refer to the example below :
<Value POSITION="4">PART</Value>

How do I define the schema for the above element?

Right now, I am writing as :

<xsd:element name="Value" minOccurs="0" maxOccurs="unbounded">


<xsd:attribute name="POSITION" type="xsd:positiveInteger" use="optional"/>



In the above, I miss out the type for the element value. How or where can I specify it? If none is specified, what will the default type be?

Thanks in advance for any help.
Received on Friday, 30 March 2001 00:48:23 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:51 UTC