codaxy / xsd2

Improved version of xsd.exe
MIT License
34 stars 21 forks source link

Missing AttributeName when genrating xs:date property #2

Closed bajicdusko closed 11 years ago

bajicdusko commented 11 years ago

If xs:date property is created in xsd as folowing: xs:attribute type="xs:date" name="startDate" use="optional"

generated line looks like this: [System.Xml.Serialization.XmlAttributeAttribute(DataType="date", "startDate")] which reports "Named attribute argument expected".

Adding AttributeName should fix this issue. [System.Xml.Serialization.XmlAttributeAttribute(DataType="date", AttributeName ="startDate")]

But, if startDate property is created as xs:dateTime, xs:attribute type="xs:dateTime" name="startDate" use="optional" generated line looks like this: [System.Xml.Serialization.XmlAttributeAttribute("startDate")] and this line is valid.

In both cases, Nullable properties are created.

mstijak commented 11 years ago

Fixed