473,386 Members | 1,609 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 1626


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:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="id" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</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.