Jaxb 使用XJCFacade分析XSD架构时。[错误]';基数';已定义

Jaxb 使用XJCFacade分析XSD架构时。[错误]';基数';已定义,jaxb,xsd,xjc,Jaxb,Xsd,Xjc,此错误与“属性'foo'已定义”非常相似。但是,请注意此错误消息未说明属性 [ERROR] 'base' is already defined line 8 of http://www.legislation.gov.uk/schemaModules/xml.xsd [ERROR] (related to above error) the first definition appears here line 114 of http://www.legislation.gov.uk/sc

此错误与“属性'foo'已定义”非常相似。但是,请注意此错误消息未说明属性

[ERROR] 'base' is already defined
  line 8 of http://www.legislation.gov.uk/schemaModules/xml.xsd

[ERROR] (related to above error) the first definition appears here
  line 114 of http://www.legislation.gov.uk/schemaModules/namespace.xsd

[ERROR] 'lang' is already defined
  line 9 of http://www.legislation.gov.uk/schemaModules/xml.xsd

[ERROR] (related to above error) the first definition appears here
  line 94 of http://www.legislation.gov.uk/schemaModules/namespace.xsd

[ERROR] 'space' is already defined
  line 17 of http://www.legislation.gov.uk/schemaModules/xml.xsd

[ERROR] (related to above error) the first definition appears here
  line 105 of http://www.legislation.gov.uk/schemaModules/namespace.xsd
我尝试使用XJCFacade在解析模式并创建相关的Java类。此模式导入另一个xsd文件,该文件反过来导入或引用其他xsd文件,包括上述错误中提到的两个

在创建和使用绑定文件之前,我遇到过类似的问题:

<bindings ...stuff removed because of SO restrictions . . .
  extenstionBindingsPrefixes="xjc"
      version="2.1">
<bindings schemaLocation="http://www.legislation.gov.uk/schemaModules/xml.xsd" node="/xs:schema">

    <!-- Customise the package name -->
    <schemaBindings>
        <package name="com.example.schema"/>
    </schemaBindings>

    <!-- rename the value element -->
        <bindings node="//xs:attribute[@name='base']">
            <property name="baseAtt"/>
        </bindings>
        <bindings node="//xs:attribute[@name='lang']">
            <property name="langAtt"/>
        </bindings>
    <bindings node="//xs:attribute[@name='space']">
            <property name="spaceAtt"/>
        </bindings>
  </bindings>
</bindings>


它确实读取了该文件,但忽略了命令。该文件肯定是被读取的,因为我故意拼错了绑定文件中的一个属性,它会告诉我对象是以该名称找到的。

将错误消息格式化为代码,以避免URL限制问题。感谢格式化提示。所有URL都是bac现在需要一些帮助来解决这个难题…问题到底是什么?您正在处理的模式文档包括两个不同的模式文档,用于相同的名称空间(特别是名称空间
http://www.w3.org/XML/1998/namespace
);导致重复(和冲突)属性xml:base、xml:lang等的声明。