2016-08-26 4 views
0

SCD로 complexType의 하위 요소를 선택하려고하는데 SCD가 complexType을 선택합니다. SCD 문서가 불량하고 하위 요소를 올바르게 선택하는 방법을 이해할 수 없습니다. 다음은 인도 표준시 XSD 조각 : 나는 다음과 같은 바인딩을 작성했습니다SCD로 complexType에서 xsd : element 선택

<xsd:complexType name="request"> 
     <xsd:sequence> 
      <xsd:element form="unqualified" 
         maxOccurs="unbounded" minOccurs="0" name="partner" 
         type="ns1:Partner" /> 
      <xsd:element form="unqualified" 
         maxOccurs="unbounded" minOccurs="0" name="foo" 
         type="xsd:anyType" /> 
      <xsd:element form="unqualified" 
         maxOccurs="unbounded" minOccurs="0" name="foo2" 
         type="xsd:anyType" />  
     </xsd:sequence> 
</xsd:complexType> 

: 나는 또한 바인딩 다음 시도했지만, 이것으로도 소스 코드를 생성하지 않습니다

<bindings scd="x-schema::tns" xmlns:tns="http:/mynamespace.com/xsd"> 
    <schemaBindings> 
     <package name="com.otherpackage.xsd" /> 
    </schemaBindings> 
    <bindings scd="/~tns:request:schemaElement:foo"> 
      <class ref="com.othernamespace.OhterFoo" /> 
    </bindings> 
    <bindings scd="/~tns:request:schemaElement:foo2"> 
      <class ref="com.othernamespace.OhterFoo" /> 
    </bindings> 
</bindings> 

.

<bindings scd="x-schema::tns" xmlns:tns="http:/mynamespace.com/xsd"> 
     <schemaBindings> 
      <package name="com.otherpackage.xsd" /> 
     </schemaBindings> 
     <bindings scd="/type::tns:request/model:sequence/schemaElement::tns:foo"> 
       <class ref="com.othernamespace.OhterFoo" /> 
     </bindings> 
     <bindings scd="/type::tns:request/model:sequence/schemaElement::tns:foo2"> 
       <class ref="com.othernamespace.OhterFoo" /> 
     </bindings> 
    </bindings> 
+0

에 규정 된 :: 이중 <클래스 REF = "com.othernamespace.OhterFoo"/>'는 기존의 클래스를 의미 하나를 생성하지 않습니다. – ulab

답변

0

사용 model::sequence 당신은`쓸 때이 example