XSD Deficiency: Incompatibility of xs:add and xs:any

Discussion in 'XML' started by KMyers1, Jul 20, 2007.

  1. KMyers1

    KMyers1 Guest

    Hello XML Gurus,

    I am quite new to XML, and could be missing something very basic, so I
    hope that you will be able to enlighten me. I am working on an
    application where I had hoped to use XML as a data storage and
    interchange format. In writing similar applications previously that
    worked with simple tabular data, it was almost always very important
    to write the application in a manner such that it would support two
    fundamental rules regarding extensibility for data storage and
    interchange formats.

    To help illustrate these rules, consider an application that requires
    an input table which must contain columns A and B. Then the
    extensibility rules that I am having a problem with in XSD can be
    stated as follows:

    1. The application should function correctly regardless of the order
    in which required columns are supplied in the input table. This means
    that tables with column ordering A,B should work equally well to a
    table with column ordering B,A.

    2. The application should function correctly regardless of additional
    columns that may be supplied in the input table, of which the
    application has no prior knowledge. This means that an application
    requiring an input table with columns A and B should work equally well
    with an input table that contains only columns A,B or with an input
    table that contains columns X,B,Y,A,Z, and that it must be possible
    for the application to be written with no prior awareness of columns
    X,Y,Z.

    With RDBMS tables, spreadsheets, delimited files, etc. it is easy to
    write an application that supports data format extensibility according
    to the two preceding rules. But I can't figure out how equivalent
    support for arbitrary element ordering and inclusion of non-specified
    elements can be implemented with XSD.

    Arbitrary element ordering is support through the use of xs:all, and
    inclusion of non-specified elements is supported through the use of
    xs:any. But these two XSD schema specifications appear to be mutually
    exclusive, i.e. you can't apply both of them to the same group of
    elements. Without the capability of using both of these
    specifications together, I can't see any way to support both of the
    above fundamental rules for data format extensibility in XSD, and this
    requirement is extremely important for my application (and many
    others).

    Can someone please enlighten me as to how the above data format
    extensibility rules can both be supported for the same group of
    elements in XSD?

    Thanks,
    Kevin M.
     
    KMyers1, Jul 20, 2007
    #1
    1. Advertising

  2. KMyers1

    Guest

    On 20 Jul, 15:21, KMyers1 <> wrote:
    > Hello XML Gurus,
    >
    > I am quite new to XML, and could be missing something very basic, so I
    > hope that you will be able to enlighten me. I am working on an
    > application where I had hoped to use XML as a data storage and
    > interchange format. In writing similar applications previously that
    > worked with simple tabular data, it was almost always very important
    > to write the application in a manner such that it would support two
    > fundamental rules regarding extensibility for data storage and
    > interchange formats.
    >...


    You're not missing anything basic. It's schema that is missing
    things. The versioning aspects of schema are absolutely awful.
    People have gone to prison for less!

    There's a paper on how to work around the versioning limitations of
    schema here:

    http://www.xml.com/pub/a/2004/10/27/extend.html

    Note that they don't really satisfy what you are looking for,
    particularly with regard to ordering.

    They are working on a new version of XSD, which will hopefully fix
    this.

    HTH,

    Pete.
    --
    =============================================
    Pete Cordell
    Codalogic
    for XML Schema to C++ data binding visit
    http://www.codalogic.com/lmx/
    =============================================
     
    , Jul 20, 2007
    #2
    1. Advertising

  3. KMyers1

    KMyers1 Guest

    > You're not missing anything basic. It's schema that is missing
    > things. The versioning aspects of schema are absolutely awful.
    > People have gone to prison for less!
    >
    > There's a paper on how to work around the versioning limitations of
    > schema here:
    >
    > http://www.xml.com/pub/a/2004/10/27/extend.html
    >
    > Note that they don't really satisfy what you are looking for,
    > particularly with regard to ordering.
    >
    > They are working on a new version of XSD, which will hopefully fix
    > this.
    >
    > HTH,
    >
    > Pete.
    > --


    Hi Pete,

    Thanks a lot for your extremely helpful comments! That is exactly the
    kind of feedback that I was looking for, although I wish that it had
    turned out to be a problem with my understanding rather than an actual
    definiciency in the schema spec.

    Regards,
    Kevin M.
     
    KMyers1, Jul 20, 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. PenguinOfDoom

    distutils deficiency

    PenguinOfDoom, Jun 25, 2003, in forum: Python
    Replies:
    0
    Views:
    726
    PenguinOfDoom
    Jun 25, 2003
  2. Gary Feldman

    Deficiency in urllib/socket for https?

    Gary Feldman, Aug 21, 2003, in forum: Python
    Replies:
    4
    Views:
    471
    John J. Lee
    Aug 23, 2003
  3. KMyers1
    Replies:
    0
    Views:
    312
    KMyers1
    Jul 20, 2007
  4. CBFalconer

    Re: Deficiency of strtok

    CBFalconer, Aug 8, 2008, in forum: C Programming
    Replies:
    5
    Views:
    277
    Ben Bacarisse
    Aug 17, 2008
  5. robic0
    Replies:
    15
    Views:
    195
    robic0
    Dec 29, 2005
Loading...

Share This Page