0
첫 번째 두 경우 중 하나라도 허용되지만 후자의 경우는 허용되지 않습니다. 이 xml에 대해 xsd를 만들 수 있습니까? 아니면 유효하지 않습니까?독점 또는 대소 문자에 대한 XML 스키마?
<book id="something" />
<!-- or -->
<book>something</book>
<!--not -->
<
<book id="something">
something else
</book>
편집 : 여기 내가 사용하려고 시도했습니다 스키마의 - XSD에서
<xs:simpleType name="book">
<xs:restriction base="xs:string">
</xs:restriction>
</xs:simpleType>
<xs:complexType name="book2">
<xs:simpleContent>
<xs:extension base="or:book">
<xs:attribute name="id" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="book3">
<xs:simpleContent>
<xs:restriction base="or:book2">
<xs:maxLength value="0" />
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
<xs:element name="root">
<xs:complexType>
<xs:choice>
<xs:element name="book" maxOccurs="unbounded" type="or:book" />
<xs:element name="book" maxOccurs="unbounded" type="or:book3" />
</xs:choice>
</xs:complexType>
</xs:element>
아, 글쎄, 1.0을 사용하고 있으며 Eclipse를 사용하고 있습니다. 1.1을 사용하거나 1.0에서 사용할 수있는 좋은 플러그인을 알고 있습니까? – Jefftopia
Java 세계에는 Xerces 버전과 자체 Saxon 프로세서의 두 가지 XSD 1.1 프로세서가 있습니다. –