나는 다음과 같이 로컬 복합 타입의 요소가 스키마를 가지고있다. XSD 제한은
<xs:complexType name="AddressType">
<xs:sequence>
<xs:element name="Line1" type="xs:string" minOccurs="0"/>
<xs:element name="Line2" type="xs:string" minOccurs="0" maxOccurs="100"/>
<xs:element name="Location" minOccurs="0" maxOccurs="100">
<xs:complexType>
<xs:sequence>
<xs:element name="XCoordinate" type="xs:decimal" minOccurs="0"/>
<xs:element name="YCoordinate" type="xs:decimal" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
이 나는 사람이 제가 worng 뭐하는 거지 이해하는 데 도움시겠습니까 다음과 같은 오류
**Error for type 'InternalAddressType'. The particle of the type is not a valid restriction of the particle of the base.
을 얻고있다
<xs:complexType name="InternalAddressType">
<xs:complexContent>
<xs:restriction base="AddressType">
<xs:sequence>
<xs:element name="Location" >
</xs:element>
</xs:sequence>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
을 다음과 같이 복합 타입을 확장하려합니다. 문제는 위치가 로컬 컴플렉스 유형이라는 것입니다. 하지만 클라이언트에서 xsd를 가져오고 Loaction 만 확장해야하므로 변경할 수 없습니다. 이 상황을 어떻게 해결할 수 있습니까? 다른 제안 사항은 환영합니다.
안녕 @kjhughes, 당신의 답장을 보내 주셔서 감사합니다. 내가 뭘 하려는지 위의 스키마 ("InternalAddressType") 위의 하나와 같은 구조지만 더 많은 요소가있는 다른 스키마 ("InternalAddressType_1")를 만들고 싶습니다 주어진 것입니다. 확장 기능을 사용할 수 있었지만 문제는 "위치"에서 변경을 허용하지 않는다는 것입니다. Location_1이라는 새로운 유형을 만들어 거기에 요소를 추가해야합니다. 따라서 필자는 부분 데이터가있는 위치의 두 가지 구조를 유지해야합니다. 위치 인스턴스가 여러 개있는 경우 어떤 문제가 발생합니까? – Rush
'InternalAddressType'을'InternalAddressType_1'으로 추가/확장하는 것을 계획하는 것은'Location'이 (여러분의 통제를 벗어난)'AddressType'에서 정의 된 방식으로 덮어 쓸 수 없다는 원래의 문제를 악화시킵니다.실질적으로 말하자면, 이러한 제한 조건 하에서'AddressType'의'Location' 정의를 공유 할 수 없다는 것을 받아 들여야 할 것 같습니다. – kjhughes