d2d2xs: NMTOKEN vs. string

Look at d2d2xs translated result.  Isn't it better to translate
   <!ATTLIST patient
                       pat_id   CDATA                  #REQUIRED
                       kennung  (intern|extern|beides) #REQUIRED
                       hausarzt IDREF                  #IMPLIED>
to:

      <xs:attribute name="kennung" use="required">
        <xs:simpleType>
          <xs:restriction base="xs:NMTOKEN">
            <xs:enumeration value="intern" />
            <xs:enumeration value="extern" />
            <xs:enumeration value="beides" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>

instead of:

      <xs:attribute name="kennung" use="required">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="intern" />
            <xs:enumeration value="extern" />
            <xs:enumeration value="beides" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
because
   Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')'

Received on Monday, 3 December 2001 16:05:00 UTC