Defining attributes for elements of native types using Schema

Hi, 

I have a very simple problem - "To define attributes
for an element of which content type is one of the
native ones defined as type="xsd:string" "

<xsd:element name="MY_ELEMENT" type="xsd:string"/>

I already tried the following, but does not seem to
work ( refer at the end of the mail ) 

Any inputs will be welcome -

Thanks, 
Shirish

<xsd:element name="MY_ELEMENT" type="xsd:string">
  <xsd:attribute name="type" type="xsd:string"
use="required"/>
</xsd:element>

OR 
<xsd:element name="MY_ELEMENT" type="String">
  <xsd:attribute name="type" type="xsd:string"
use="required"/>
</xsd:element>

 <xsd:simpleType name="String">
  <xsd:restriction base="xsd:string">  
   <xsd:maxLength value="32"/>
  </xsd:restriction>
 </xsd:simpleType>

XML - 
<MY_ELEMENT type="int">actual_value</MY_ELEMENT>

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

Received on Sunday, 2 March 2003 23:54:37 UTC