Re: phantom attribute?

Another schema 1.1 feature that's applicable to a variety of 
"co-occurrence" constraints is <xs:assert>.  See [1].  Assert tends to be 
more generally useful; Conditional type assigment models a particular 
important idiom, in which value(s) of some or all attribute(s) on an 
element serve to identify the overall type of its content.  Assert allows 
you to check a fairly broad range of constraints regarding the tags and 
values present in an otherwise conventionally typed element.

Noah

[1] http://www.w3.org/TR/xmlschema11-1/#cAssertions

On 9/30/2010 2:15 PM, G. Ken Holman wrote:
> At 2010-09-30 14:04 -0400, I wrote:
>> That is a co-occurrence constraint. The cardinality of 'direction' is
>> based on the presence or absence of 'signal'.
>>
>> You can express some co-occurrence constraints using W3C Schema 1.1, but
>> it hasn't been finalized yet.
>
> The feature that implements some co-occurrence constraints is "conditional
> type assignment".
>
> Sorry for not making myself clear the first time.
>
> . . . . . . . . . Ken
>
> At 2010-09-30 10:51 -0700, David McBride wrote:
>> I might be misunderstanding what you're saying, but it seems that you're
>> assuming that I can rename the elements. I can't. I'm trying to build a
>> schema around an existing convention. I'm not free to change any of the
>> element or attribute names.
>>
>> Here are some points to consider:
>> 1. 'method' elements may contain 'arg' elements
>> 2. 'signal' elements may contain 'arg' elements.
>> 3. When an 'arg' element appears with 'method', the 'arg' element must
>> include a 'direction' attribute (default = "in")
>> 4. When an 'arg' element appears with 'signal', the 'arg' element must NOT
>> include a 'direction' attribute.
>
> That is a co-occurrence constraint. The cardinality of 'direction' is based
> on the presence or absence of 'signal'.
>
> You can express some co-occurrence constraints using W3C Schema 1.1, but it
> hasn't been finalized yet.
>
> You can express co-occurrence constraints using ISO/IEC 19757-2 RELAX-NG.
>
> You can express co-occurrence constraints using ISO/IEC 19757-3 Schematron.
>
> You cannot have attribute cardinality based on content in W3C Schema 1.0.
>
> I hope this helps.
>
> . . . . . . . . . . . Ken
>
> --
> XSLT/XQuery training: after http://XMLPrague.cz 2011-03-28/04-01
> Vote for your XML training: http://www.CraneSoftwrights.com/x/i/
> Crane Softwrights Ltd. http://www.CraneSoftwrights.com/x/
> G. Ken Holman mailto:gkholman@CraneSoftwrights.com
> Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/x/bc
> Legal business disclaimers: http://www.CraneSoftwrights.com/legal
>
>
>

Received on Thursday, 30 September 2010 20:08:52 UTC