3
Vote

xs:Attribute with simpleType isn't generated properly

description

This is the sample definition (contained in METER element):
<xs:attribute name="PHASE" use="required">
  <xs:annotation>
    <xs:documentation>Phases of metering point</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:enumeration value="1" />
      <xs:enumeration value="3" />
    </xs:restriction>
  </xs:simpleType>
</xs:attribute>
 
It incorrectly generates the PHASE element as a property with METERPHASE type which doesn't exists and private fields (pHASEField) are not generated. Should be simple property of string type, like public string PHASE {get;set;}.

comments

tjanovsky wrote Apr 11, 2011 at 12:38 PM

I made really bad description here.. In another words, it doesn't work with attributes that have some restriction.