I have a type in a schema:
<xs:complexType name="SimpleExt">
<xs:simpleContent>
<xs:extension base="xs:int">
<xs:attribute name="name" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
which I run xsd.exe /c on. It creates the following class:
/// <remarks/>
public class SimpleExt {
/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute()]
public string name;
/// <remarks/>
[System.Xml.Serialization.XmlTextAttribute()]
public int Value;
}
When I compile the class and run xsd.exe on the dll, I get:
<xs:complexType name="SimpleExt">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="name" type="xs:string"
/>
<xs:element minOccurs="1" maxOccurs="1" name="Value" type="xs:int" />
</xs:sequence>
</xs:complexType>
This is clearly not what I want. I need to define a class that will
generate the original schema. As you can see, the second schema didn't even
honor my attributes. What must I do in my class to do that? Is this a
xsd.exe limitation?
Thanks and I appreciate your help.
Jiho