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

Discussion in 'XML' started by easy.lin@gmail.com, Jun 13, 2006.

  1. Guest

    ....
    <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, 2006
    #1
    1. Advertising

  2. 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/
     
    Martin Honnen, Jun 14, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Markus
    Replies:
    1
    Views:
    1,112
    Markus
    Nov 22, 2005
  2. jkn
    Replies:
    9
    Views:
    9,096
    robin
    Feb 27, 2006
  3. John Doe
    Replies:
    1
    Views:
    133
    Ken Cox [Microsoft MVP]
    Nov 21, 2003
  4. Tony Mobily
    Replies:
    2
    Views:
    96
    Tony Mobily
    Feb 23, 2006
  5. Banzai

    Solaris door Ruby bindings

    Banzai, Jun 16, 2007, in forum: Ruby
    Replies:
    2
    Views:
    94
    Banzai
    Jun 17, 2007
Loading...

Share This Page