Can XSD simple types be derived from complex types?

Discussion in 'XML' started by Soren Kuula, Nov 30, 2005.

  1. Soren Kuula

    Soren Kuula Guest

    Looks like a silly question? I'm in doubt!

    - the Recommendation does it (anyType / anySimple type)

    - it's possible to restrict away all optional elements and attributes
    from a mixed complex type. If doing that on a type where all elements
    and attributes are optional, does that leave one with the equivalent of
    anySimpleType, then?

    Soren
     
    Soren Kuula, Nov 30, 2005
    #1
    1. Advertising

  2. Soren Kuula

    Soren Kuula Guest

    Soren Kuula wrote:
    > Looks like a silly question? I'm in doubt!
    >
    > - the Recommendation does it (anyType / anySimple type)
    >
    > - it's possible to restrict away all optional elements and attributes
    > from a mixed complex type. If doing that on a type where all elements
    > and attributes are optional, does that leave one with the equivalent of
    > anySimpleType, then?
    >
    > Soren


    -- or is the answer: It's possible enough in the way I said, but XSD
    doesn't provide for it syntactically?

    Soren
     
    Soren Kuula, Nov 30, 2005
    #2
    1. Advertising

  3. Soren Kuula writes:

    > Looks like a silly question? I'm in doubt!
    >
    > - the Recommendation does it (anyType / anySimple type)


    That's special-cased.

    > - it's possible to restrict away all optional elements and attributes
    > from a mixed complex type. If doing that on a type where all elements
    > and attributes are optional, does that leave one with the equivalent
    > of anySimpleType, then?


    Not really -- such a type defn would have untyped content, not quite
    the same as anySimpleType -- _but_ you can derive a complex type defn
    with simple content, e.g. xs:date, from an emptiable mixed complex
    type defn.

    ht
    --
    Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
    Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
    Fax: (44) 131 650-4587, e-mail:
    URL: http://www.ltg.ed.ac.uk/~ht/
    [mail really from me _always_ has this .sig -- mail without it is forged spam]
     
    Henry S. Thompson, Dec 1, 2005
    #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. mjcsfo
    Replies:
    0
    Views:
    893
    mjcsfo
    Aug 14, 2003
  2. mjcsfo
    Replies:
    0
    Views:
    1,319
    mjcsfo
    Aug 14, 2003
  3. Replies:
    1
    Views:
    412
    myork
    May 23, 2007
  4. Replies:
    1
    Views:
    400
    Victor Bazarov
    May 23, 2007
  5. Steve
    Replies:
    1
    Views:
    444
    Martin Honnen
    Jun 14, 2007
Loading...

Share This Page