W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2010

RE: phantom attribute?

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Thu, 30 Sep 2010 14:04:03 -0400
Message-Id: <7.0.1.0.2.20100930140219.0235f570@wheresmymailserver.com>
To: <xmlschema-dev@w3.org>
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 18:06:15 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:18 UTC