Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: new to schema: Unique Particle Attribution

From: Burak Emir <Burak.Emir@----.-->
To: Kostas Karadamoglou <karadamoglou_k@-----.-->
Date: 4/6/2005 12:39:00 PM
Kostas Karadamoglou wrote:

> question can have either:
>
> title(optional), content and weight
>
> or:
>
> title, content(optional), weight(optional) and question
>
> I tried to implement the above rules in an xml schema but I got a 
> "Unique Particle Attribution". Below I provide you with the xml 
> fragment that implement the rules. Can you tell me how I can implement 
> these rules?

You cannot do this. Put yourself in the place of a guy (the validator) 
that sees only one element at a time.

Abbreviated, your content model starts with something like (a? b) | (a b?)

Now after seeing an 'a' (i.e. title), how does this guy decide whether 
he allows to omission of the 'b'?

There is more than one way to go through the content model (the regular 
expression), which violates the UPA.

It does not look like you can factor this out in the way you want. My 
proposal is to make an abstract 'question', and two concrete 'questionA' 
and 'questionB' that are in the substitution group of 'question'. Or, 
use (questionA | questionB) wherever you used question.

The other possibility is to reorder this into

(title?, content, weight)
|
(question, title, content?, weight?)

See, now there is never any ambuiguity about the branch you are in, so 
you have UPA.

cheers,
Burak

-- 
Burak Emir

http://lamp.epfl.ch/~buraq


From mike@s... Wed Apr 06 09:06:23 2005
Received: from maggie.w3.org ([


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent