Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: alternative obligatory attributes

From: "G. Ken Holman" <gkholman@----------------.--->
To: <xmlschema-dev@--.--->
Date: 3/12/2009 10:00:00 AM
At 2009-03-12 18:06 +0100, Kl=F6ck, Erwin wrote:
>is it possible to define alternative obligatory 
>attributes for an element? What I want is something like the following,
>where the element otto must have either of two 
>attributes but not both. If it is possible, how would one do this?
>
><top>
>         <file uri="xxxx"/>
>         <file relative-path="yyyy"/>
></top>

No, when using W3C Schema 1.0, because sibling 
elements of the same name cannot have different validation constraints.

Yes, when using W3C Schema 1.1 (using 
assertions), or ISO/IEC 19757-3 Schematron (using 
assertions) or ISO/IEC 19757-2 RELAX-NG (using a 
choice pattern on the attributes).

I hope this helps.

. . . . . . . . . . . . . Ken

--
XQuery/XSLT training in Prague, CZ 2009-03 http://www.xmlprague.cz
XQuery/XSLT/XSL-FO training in Los Angeles (New dates!) 2009-06-08
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman                 mailto:gkholman@C...
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/x/
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/x/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal


From mailing-deg@b... Fri Mar 13 01:00:41 2009
Received: from farnsworth.w


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