Restrictions in XSD

Discussion in 'XML' started by TIANA, Dec 7, 2004.

  1. TIANA

    TIANA Guest

    Hi guys
    Unfortunately I’m a newbee to xml and xsd Schemes. I’m
    having the following xml file:

    <config >
    <section name="A">
    <entry key="k1" val="aaa" />
    <!-- (range for 'val' = aaa|bbb|ccc-->
    <entry key="k2" val ="true" />
    <!-- (range for 'val' = true|false) -->
    </section>
    <section name="B">
    <entry key="k3" val ="3" />
    <!-- (range for 'val' = 1...10) -->
    </section>
    </ config >


    Now, I'd like to create an xsd file for it.
    I have no idea how to define the range for the attribute 'val'
    depending on the values for the 'name' - attribute of the element
    'ection' and the 'key' attribute in 'entry'
    I think I have to use xsd:restriction /enumeration
    But how do I express those dependencies????

    I hope, I did not confuse you guys too much.
    I'd be glad for any kind of help or hint how to start.
    TIA
     
    TIANA, Dec 7, 2004
    #1
    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,145
    Markus
    Nov 22, 2005
  2. Rick Razzano

    XSD document for XSD defintion

    Rick Razzano, Sep 26, 2003, in forum: XML
    Replies:
    1
    Views:
    506
    C. M. Sperberg-McQueen
    Sep 26, 2003
  3. Dmitry Kulinich
    Replies:
    5
    Views:
    559
  4. voorth
    Replies:
    4
    Views:
    472
    voorth
    Feb 12, 2008
  5. Arinté

    XSD restrictions/extensions

    Arinté, Dec 18, 2008, in forum: XML
    Replies:
    0
    Views:
    760
    Arinté
    Dec 18, 2008
Loading...

Share This Page