[relaxng-user] WG: choice of equal attributes

David Tolpin dvd at davidashen.net
Tue Jan 13 15:55:53 ICT 2004


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


More information about the relaxng-user mailing list