相关疑难解决方法(0)

JAXB编译问题 - [错误]属性"任何"已定义

我正在尝试为xccdf-1.1.4.xsd创建JAXB绑定,这是一个可以从XCCDF Schema Location获取的标准模式

我目前正在使用EclipseLink MOXy作为我的JAXB实现,因为我喜欢它也可以生成JSON绑定.

我修复了几次使用外部绑定XML命中臭名昭着的"[ERROR]属性"值"已定义"错误,现在我遇到了错误

[ERROR] Property "Any" is already defined. Use <jaxb:property> to resolve this conflict.
line 441 of file:/home/dchu/Playground/Java/eclipselink_moxy/xccdf_1.1.4/xccdf-1.1.4.xsd

[ERROR] The following location is relevant to the above error
line 444 of file:/home/dchu/Playground/Java/eclipselink_moxy/xccdf_1.1.4/xccdf-1.1.4.xs
Run Code Online (Sandbox Code Playgroud)

下面是XML架构中发生错误的行的片段.

<xsd:sequence>
    <xsd:choice minOccurs="1" maxOccurs="1">
      <xsd:any namespace="http://purl.org/dc/elements/1.1/"
               minOccurs="1" maxOccurs="unbounded"/>
      <xsd:any namespace="http://checklists.nist.gov/sccf/0.1"
               processContents="skip" 
               minOccurs="1" maxOccurs="unbounded"/>
    </xsd:choice>
</xsd:sequence>
Run Code Online (Sandbox Code Playgroud)

有谁知道这里有什么不对吗?谢谢!

jaxb eclipselink moxy

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

eclipselink ×1

jaxb ×1

moxy ×1