다음 xml 구조의 xsd 파일이 있습니다. MyVals 열거자는 무엇을해도 생성되지 않습니다.xsd를 생성하는 동안 문제가 발생했습니다.
<xs:simpleType name="MyVals">
<xs:restriction base="xs:string">
<xs:enumeration value="1" />
<xs:enumeration value="2" />
<xs:enumeration value="3" />
<xs:enumeration value="4"/>
</xs:restriction>
</xs:simpleType>
다른 모든 구조가 올바르게 채워집니다. 완전한 xsd가 아래에 주어집니다.
<?xml version="1.0"?>
<xs:schema targetNamespace="http://www.simple.com/xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="1.0"
xmlns:wepa="http://www.simple.com/xsd"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
>
<xs:element name="MessageProtocol" >
<xs:complexType >
<xs:sequence>
<xs:element name ="Header" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name ="Body" type="xs:string" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="MyVals">
<xs:restriction base="xs:string">
<xs:enumeration value="1" />
<xs:enumeration value="2" />
<xs:enumeration value="3" />
<xs:enumeration value="4"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
XSD 생성 명령 : C : \ 프로그래밍 ~ 1 "마이크로 소프트의 SDK"\ WINDOWS \ v6.0A \ 빈 \ \ xsd.exe -c/enabledDataBinding -l : C#을 단순 /namespace:Simple.SimpleXSD. xsd