473,581 Members | 2,757 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to formulize <object id="10">door</object> in XSD?

....
<object id="10">door</object>
....

I try to write this in clipse XSD editor
<element name="object" type="string">
<attribute name="id" type="int"></attribute>
</element>

but get wrong message....

Jun 13 '06 #1
1 1642


ea******@gmail. com wrote:
...
<object id="10">door</object>
...

I try to write this in clipse XSD editor
<element name="object" type="string">
<attribute name="id" type="int"></attribute>
</element>


If an element has an attribute then in terms of the W3C XSD schema
language it has a complex type so you need e.g.
<xs:element name="object">
<xs:complexType >
<xs:simpleConte nt>
<xs:extension base="xs:string ">
<xs:attribute name="id" type="xs:string " />
</xs:extension>
</xs:simpleConten t>
</xs:complexType>
</xs:element>

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jun 14 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.