首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用SCD从complexType中选择xsd:element

使用SCD从complexType中选择xsd:element
EN

Stack Overflow用户
提问于 2016-08-26 17:02:25
回答 1查看 530关注 0票数 0

我尝试使用SCD选择complexType的子元素,但SCD选择了一个complexType。SCD文档很差,我不明白如何正确选择子元素。下面是XSD代码片段:

代码语言:javascript
复制
<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>

我已经编写了以下绑定:

代码语言:javascript
复制
<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>

我也尝试过遵循绑定,但在这个绑定中,它甚至不生成源代码。

代码语言:javascript
复制
<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>
EN

回答 1

Stack Overflow用户

发布于 2016-08-27 00:14:07

使用此example中提供的model::sequence double ::

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39162421

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档