Schema element name selectable, attributes not

Discussion in 'XML' started by Alex Sab, Apr 5, 2004.

  1. Alex Sab

    Alex Sab Guest

    Hi,
    I have a XML structure where the element name can be chosen freely but
    the element attributes must be all of the same names.

    <Node>
    <AnyName1 Type="Single" Unit="" Comment="">0</AnyName1>
    <AnyName2 Type="Single" Unit="" Comment="">0</AnyName2>
    <AnyName3 Type="Single" Unit="" Comment="">0</AnyName3>
    <AnyName4 Type="Single" Unit="" Comment="">0</AnyName4>
    <AnyName5 Type="Single" Unit="" Comment="">0</AnyName5>
    <AnyName6 Type="Single" Unit="" Comment="">0</AnyName6>
    </Node>

    Is is possible to make a schema that works for any element name? The
    schema should not know about AnyName1, AnyName2, ...

    Regards,
    Alex
    Alex Sab, Apr 5, 2004
    #1
    1. Advertising

  2. Alex Sab wrote:

    > I have a XML structure where the element name can be chosen freely but
    > the element attributes must be all of the same names.
    >
    > <Node>
    > <AnyName1 Type="Single" Unit="" Comment="">0</AnyName1>
    > <AnyName2 Type="Single" Unit="" Comment="">0</AnyName2>
    > <AnyName3 Type="Single" Unit="" Comment="">0</AnyName3>
    > <AnyName4 Type="Single" Unit="" Comment="">0</AnyName4>
    > <AnyName5 Type="Single" Unit="" Comment="">0</AnyName5>
    > <AnyName6 Type="Single" Unit="" Comment="">0</AnyName6>
    > </Node>
    >
    > Is is possible to make a schema that works for any element name? The
    > schema should not know about AnyName1, AnyName2, ...


    You can use
    <xs:any />
    to specify that an element with any name can occur but I don't think you
    can then restrict the attributes that element can have.
    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Apr 5, 2004
    #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,518
    Markus
    Nov 23, 2005
  2. Gehirnloser Zombie
    Replies:
    2
    Views:
    426
    Gehirnloser Zombie
    Jan 13, 2004
  3. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,243
    Stanimir Stamenkov
    Apr 25, 2005
  4. Replies:
    3
    Views:
    2,824
  5. Doctor Memory

    Extra space on menu item not selectable

    Doctor Memory, Sep 12, 2007, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    169
    Doctor Memory
    Sep 12, 2007
Loading...

Share This Page