xs:all in schema

Discussion in 'XML' started by Mike Ferenduros, Dec 13, 2003.

  1. Hi,

    I'm working on a schema for a bunch of existing XML files, and I need
    to specify a list of elements that can appear in varying
    quantities...I though xs:all was what I needed, but I just found out
    that maxOccur can only be 0 or 1 in an xs:all list. I'd use
    xs:sequence, but the elements can appear in any order.

    Am I missing something? If anyone's got a minute to point me in the
    right direction it'd be greatly appreciated.

    Thanks in advance,
    Mike Ferenduros
    Mike Ferenduros, Dec 13, 2003
    #1
    1. Advertising

  2. (Mike Ferenduros) wrote:

    > Hi,
    >
    > I'm working on a schema for a bunch of existing XML files, and I need
    > to specify a list of elements that can appear in varying
    > quantities...I though xs:all was what I needed, but I just found out
    > that maxOccur can only be 0 or 1 in an xs:all list. I'd use
    > xs:sequence, but the elements can appear in any order.
    >
    > Am I missing something? If anyone's got a minute to point me in the
    > right direction it'd be greatly appreciated.


    Have a look at xs:choice which may serve as a workaround for the
    strict constraints of xs:all.

    However, watch out when defining content models using xs:choice as
    some constraints may be easily broken.

    Cheers

    Jens
    --
    (Intentionally left blank.)
    Jens M. Felderhoff, Dec 14, 2003
    #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,497
    Markus
    Nov 23, 2005
  2. Klaus Johannes Rusch

    Re: Convert DB2 schema to XML Schema

    Klaus Johannes Rusch, Aug 6, 2003, in forum: XML
    Replies:
    0
    Views:
    549
    Klaus Johannes Rusch
    Aug 6, 2003
  3. Brett Selleck

    Schema Metadata not a Metadata Schema

    Brett Selleck, Sep 4, 2003, in forum: XML
    Replies:
    1
    Views:
    399
    Andy Dingley
    Sep 4, 2003
  4. Fred Smith
    Replies:
    1
    Views:
    925
    Martin Honnen
    Feb 5, 2004
  5. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,172
    Stanimir Stamenkov
    Apr 25, 2005
Loading...

Share This Page