2
는 직관적으로 "확장"기본 유형을 수정하지, 기본 유형에 무언가를 추가하는 것을 의미한다. 다음 XSD는 XML 스키마 확장의 의미
<complexType name="B">
<attribute name="A1" type="int" use="required" />
<anyAttribute namespace="##other" processContents="strict" />
</complexType>
<complexType name="D">
<complexContent >
<extension base="tns:B">
<!--???-->
<attribute name="A1" type="int" use="optional" />
<anyAttribute namespace="##other" processContents="lax" />
</extension>
</complexContent>
</complexType>
컴파일해야합니다. 그러나 XML 스키마 컴파일러 (System.Xml.Schema.XmlSchema)는 오류를 발생시키지 않습니다. 이 반 직관적 디자인의 이성은 무엇입니까? 스키마에 문제가 있습니다
나는 이유를 알고 : XML 스키마는 "구조 입력"이 아닌 "공칭 입력"입니다 ...... –