Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XML Schema

From: George Cristian Bina <george@----.-->
To: Udo Ende <u.ende@---.-->
Date: 11/9/2005 11:42:00 AM
Hi Udo,

You cannot do much more than this. The only thing I can think of is that 
you can use key constraints to enforce some elements that do not have 
complex content to appear and to appear only once.
You have to move this check at application level or you can use 
Schematron embedded rules, but that will not be XML Schema alone.

Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
www.---.com


Udo Ende wrote:
> Hi,
> 
> I do not find a solution for my following problem:
> 
> The root elements of my XML data contain many different inner elements.
> Therefore I chose a complexType definition for the root elements.
> 
> Some of the inner elements are only optional, others are included more than
> one time (therefore I can not use "all" for the complexType).
> 
> I can not tell in which order the inner elements will appear. Therefore I
> can not use "sequence" for the complexType.
> 
> I decided to use "choice" - with the attribute "maxOccurs" "unbounded" not
> only allowing one element under the root elements.
> 
> But with that it seems I lose a validation opportunity to tell if an inner
> element must appear or is only optional (minOccurs 1 for the inner elements
> does not show a difference within validation).
> 
> Any idea how I could handle this situation?
> 
> Regards,
> Udo
> 
> 

From kykim_lists@m... Wed Nov 09 07:43:46 2005
Received: from maggie.w3


transparent
Print
Mail
Digg
delicious
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