【问题标题】:ERROR Element type "jxb:bindings" must be followed by either attribute specifications, ">" or "/>"错误元素类型“jxb:bindings”必须后跟属性规范“>”或“/>”
【发布时间】:2016-10-19 19:00:42
【问题描述】:

大家好,我正在尝试创建一个有助于解决属性名称冲突的外部绑定文件。我得到的错误如下。

[错误] 属性“行”已定义。使用 解决此冲突。

[错误] 属性“标题”已定义。使用 解决此冲突。

外部绑定文件如下所示。

<jaxb:bindings schemaLocation="http://www.w3.org/1999/xlink.xsd" node="/xs:schema">
            <jaxb:bindings>
                    <jaxb:nameXmlTransform>
                            <jaxb:elementName suffix="Element"/>
                    </jaxb:nameXmlTransform>
                    <jaxb:bindings node="//xs:attribute[@name='title']">
                            <jaxb:property name="Atitle"/>
                    </jaxb:bindings>
            </jaxb:bindings>
    </jaxb:bindings>

我尝试使用此文件,但收到错误 ERROR] 元素类型“jxb:bindings”必须后跟属性规范、“>”或“/>”。有人有原因吗?

【问题讨论】:

    标签: xml xsd jaxb schema


    【解决方案1】:

    这听起来像是错误消息试图告诉您有一个 jxb:bindings 元素,该元素具有未封闭的属性值或未封闭的开始标签或唯一标签。我在您的示例数据中没有看到它,但是您的示例数据也没有使用错误消息中给出的命名空间前缀,所以我预计在途中会发生一些变化。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-03-12
      • 2012-01-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-27
      • 2014-01-12
      相关资源
      最近更新 更多