Schema data type setting

Discussion in 'XML' started by The Magpie, May 26, 2007.

  1. The Magpie

    The Magpie Guest

    Thanks for the help with the FAQ and the IBM page, but they didn't help
    and I've had no luck finding the answer so far. In fact, I'm beginning
    to think what I want can't be done. If anyone knows of a method to
    manage it can you help out please?

    Basically, I'm looking at validating datatypes. They come in sets, of
    one or more validations so we might have (descriptive, not actual code):

    <type "a">
    <restriction pattern="validation1"/>
    </type>

    <type "b">....</>

    <type "c">....</>

    What I'm looking for is a way to define a type that will be valid for
    any data that meets any one of the three example datatypes so that:

    <type "maintype">
    <either is type "a" valid/>
    <or is type "b" valid/>
    <or is type "c" valid/>
    </type>

    Any ideas anyone?
    The Magpie, May 26, 2007
    #1
    1. Advertising

  2. Priscilla Walmsley, May 27, 2007
    #2
    1. Advertising

  3. The Magpie

    The Magpie Guest

    Priscilla Walmsley wrote:
    > Sounds like what you need is a union type.
    >
    > See an example at:
    >
    > http://www.datypic.com/books/defxmlschema/chapter11.html#EX116
    >
    > Hope that helps,
    > Priscilla
    >

    You know what? That not only could be what I want, but I'm stunned it
    never occurred to me. Thanks - I'll try it.
    The Magpie, May 28, 2007
    #3
    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. CJ
    Replies:
    1
    Views:
    1,567
    Andrew Thompson
    Oct 29, 2004
  2. Markus
    Replies:
    1
    Views:
    1,530
    Markus
    Nov 23, 2005
  3. Joyce
    Replies:
    0
    Views:
    548
    Joyce
    Mar 1, 2005
  4. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,251
    Stanimir Stamenkov
    Apr 25, 2005
  5. Stanimir Stamenkov
    Replies:
    2
    Views:
    744
    Stanimir Stamenkov
    Oct 25, 2005
Loading...

Share This Page