473,385 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

XML Schema EDC, UPA and substitution groups

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
Feb 2 '06 #1
2 1369
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 ***
Feb 2 '06 #2
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
Feb 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Gregg Williams | last post by:
Hi--I am having a problem designing a schema to fit my XML data, and I'm hoping that someone can help. Essentially, I have a schema in mind and two target vocabularies for it, where one vocabulary...
2
by: John Carron | last post by:
Hi All, I have written a simple schema (see below) that uses substitution groups. I don't know if this the correct usage because I'm fairly new to xml schema. The structure is as follows: ...
0
by: John Carron | last post by:
Hi All, I have written a simple schema (see below) that uses substitution groups. I don't know if this the correct usage because I'm fairly new to xml schema. The structure is as follows: ...
0
by: Andrew Dawson | last post by:
I am looking into the possibilities that exist from utilizing XML Schema documents to store the structure of datasets that don't change frequently for access in distributed applications. I...
2
by: nepo | last post by:
I try to validate a complex schema using XSD and I get a series of errors of the following format: Validation Error:'http://xml.msdw.com/ns/mdco/data/1.0:tradeSymbol' cannot be a member of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.