Results 1 to 8 of 8

Thread: Schema is non-deterministic?

  1. #1

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Unhappy Schema is non-deterministic?

    When I validate an XML document with an XSD document using MSXML 4, I get the following error:

    "Scema is non deterministic".

    This only happens when I include the following line in the schema:

    Code:
    <xs:any minOccurs="0"/>
    I need to include this line in order to make sure that documents created against this schema are extensible.
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    I think this happens if this line is presented as an alternative in the wrong way. Concrete alternatives need somehow be marked as preferred, I think. There are no precedence rules in Schema, so

    <xs:any .../>
    <xs:element ...>...</xs:element>

    would be invalid because the xs:element would never be considered. I think that's what the error means in this case.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796
    How do I present it in the right way then?
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    I don't know. I'm not that familiar with Schema.
    But I believe there is a way to force foreign extension elements to come from a different namespace. You could try that.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796
    Unfortunately, I can't do that because there is no such namespace. I want my documents that are created with future versions of my schema to be compatible with this version of the schema too.

    For instance, if a newer version of my schema contains additional elements, I want the original version of the schema to simply ignore these additional elements, only validating the original elements...
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Well, you could simply say that there IS such a namespace, an extension namespace. Have future versions of this document use a different namespace for extensions.

    I can't help you further than that.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  7. #7

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796
    Thanks.

    Haven't seen you around for a while...? Don't do galah/mangojacks these days?
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  8. #8
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Very little on MangoJack. I regularly browse GalahTech, but not the chat section.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width