RE: phantom attribute?
"G. Ken Holman" <[email protected]>
| Newsgroups | gmane.text.xml.schema.devel |
|---|---|
| Message-ID | <[email protected]> |
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:[email protected] Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/x/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal