xml 파일에 대해 xml 스키마를 쓰고 있습니다. 다음 코드에 대해이 오류가 발생하지만 이유를 파악할 수 없습니다. 어떠한 제안?xml 스키마 (XML 오류)
cvc-type.3.1.1 : 'employees'요소는 단순한 유형이므로 'http://www.w3.org/2001/XMLSchema-a-'과 동일한 네임 스페이스 이름을 가진 요소를 제외하고는 특성을 가질 수 없습니다. instance '이고 [local name]은'type ','nil ','schemaLocation '또는'noNamespaceSchemaLocation '중 하나입니다. 그러나 'essns'속성이 발견되었습니다. 문제는 simpleType에서 시작하여 발견되었습니다.
<xs:element name="employees" >
<xs:simpleType>
<xs:list itemType ="xs:integer"/>
</xs:simpleType>
</xs:element>
<xs:element name= "projectsControlled">
<xs:simpleType>
<xs:list itemType ="xs:integer" />
</xs:simpleType>
</xs:element>
이 다음
는 XML 코드<employees essns="888665555"/>
<projectsControlled pnos="20"/>
오류 메시지는 매우 명확하게 보입니다. 'employees' 타입은 스키마가 그것을 허용하지 않기 때문에'essns' 속성을 가질 수 없습니다. –