Re: WG: choice of equal attributes

David Tolpin <[email protected]>
Newsgroups gmane.text.xml.relaxng.general
Message-ID <[email protected]>
Michael,

these are two separate problems, I think. One is whether duplicate attributes
are allowed -- they are not, as stated in 7.3.

The other is whether you need it; NCName and IDREF are the same type in Relax NG.
Your grammar is equivalent to

<define name="reference">
  <optional>
    <attribute name="instance">
	<data type="IDREF"/>
    </attribute>
  </optional>
  <attribute name="ref">
    <data type="IDREF"/>
  </attribute>
</define>

or, since you've mentioned the compact syntax

reference=attribute instance {xsd:IDREF}?, attribute ref {xsd:IDREF}


David Tolpin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.