467,905 Members | 1,896 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,905 developers. It's quick & easy.

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
  • viewed: 1390
Share:
1 Reply


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 discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.