Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XML Schema EDC, UPA and substitution groups

Reply
Thread Tools

XML Schema EDC, UPA and substitution groups

 
 
Soren Kuula
Guest
Posts: n/a
 
      02-02-2006
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
 
Reply With Quote
 
 
 
 
Priscilla Walmsley
Guest
Posts: n/a
 
      02-02-2006
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 ***
 
Reply With Quote
 
 
 
 
Soren Kuula
Guest
Posts: n/a
 
      02-03-2006
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
web.xml / XML schema issue, why do some XML schema attributes disappear asciz@starmail.com Java 3 02-20-2007 09:56 AM
Xml Schema substitution groups / key keyref John Carron XML 2 09-02-2005 06:22 PM
Xml Schema substitution groups / key and keyref John Carron XML 0 09-01-2005 06:52 PM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
XML schema regular expressions question and recommended XML Schema book Fred Smith XML 1 02-05-2004 11:12 AM



Advertisments