XML Schema EDC, UPA and substitution groups

Discussion in 'XML' started by Soren Kuula, Feb 2, 2006.

  1. Soren Kuula

    Soren Kuula Guest

    Hi,

    Does anyone happen to know whether this is legal:

    <complexType name= ...>
    <choice>
    <element ref="foo"/>
    <element ref="bar"/>
    </choice>
    </complexType>

    <!-- nice enough so far... -->

    <element name="foo" type=... substitutionGroup="bar"/>

    <element name="bar" type=.../>

    Problem: If bar is susbsted by foo, then EDC is violated.... hehehe --

    Wonder is this is explicitly prohibited somehow?

    Also, does anyone know why they required that the type of foo be derived
    from that of bar, and is it true that it must be in ONE or more steps
    (not zero or more?)

    Soren
    Soren Kuula, Feb 2, 2006
    #1
    1. Advertising

  2. Hi,

    Yes, this is prohibited, by UPC and not EDC. It is discussed in:

    http://www.w3.org/TR/xmlschema-1/#non-ambig

    and

    http://www.w3.org/TR/xmlschema-1/#cos-nonambig


    It is _not_ true that it has to be at least one step. foo and bar can
    have the same type.

    Hope that helps,
    Priscilla

    ----------------------------------
    Priscilla Walmsley
    Author, Definitive XML Schema
    Definitive XQuery
    http://www.datypic.com
    ----------------------------------

    *** Sent via Developersdex http://www.developersdex.com ***
    Priscilla Walmsley, Feb 2, 2006
    #2
    1. Advertising

  3. Soren Kuula

    Soren Kuula Guest

    Hi, thanks Priscilla

    Priscilla Walmsley wrote:

    > Yes, this is prohibited, by UPC and not EDC. It is discussed in:


    Whoops, yes there is no EDC issue with that. UPC -- is that UPA ;) ?

    > It is _not_ true that it has to be at least one step. foo and bar can
    > have the same type.


    Thought so .. ok I have a correction for my author friend on that one...

    Soren
    Soren Kuula, Feb 3, 2006
    #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. Markus
    Replies:
    1
    Views:
    1,497
    Markus
    Nov 23, 2005
  2. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,172
    Stanimir Stamenkov
    Apr 25, 2005
  3. John Carron
    Replies:
    2
    Views:
    844
    John Carron
    Sep 2, 2005
  4. John Carron
    Replies:
    0
    Views:
    462
    John Carron
    Sep 1, 2005
  5. Replies:
    3
    Views:
    2,797
Loading...

Share This Page