Enumeration or any string

Enumeration or any string (a co-constraint use case)

Make the type of one attribute (xsd:string vs. enumeration restricting NMTOKEN) depend on the presence or absence of a second attribute.

Cf. Alternative enumerations

source: Fabio Vitali

Other use cases: Co-constraint Use Cases


   If no appropriate term appears in the dictionary, just use any string, and put
   no "dict" attribute.

        <keyword dict="dict1" term="term1"/>
        <keyword              term="strangeTerm"/>


(Add your analysis here; see your name in pixels!)

Possible solutions

Relax NG


Check clause


Conditional Type

Last modified on 31 March 2006, at 06:40