0
我正在尝试修复JAXB从一组XSD生成类时发生的冲突。这里的XML:JAXB绑定XPath错误
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" ...>
...
<xs:simpleType name="List_OfferDimensionUOM">
...
</xs:simpleType>
</xs:schema>
和binding.xjb文件:
<jxb:bindings version="1.0"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<jxb:bindings schemaLocation="OTA_Lists.xsd" node="/xs:schema">
<jxb:bindings node="xs:simpleType[@name='List_OfferDistanceUOM']">
<jxb:property name="List_OfferDistanceUOMList"/>
</jxb:bindings>
</jxb:bindings>
</jxb:bindings>
我试图定义的XPath所需的元素的几个不同的组合,和我不断收到同样的错误:
compiler was unable to honor this property customization. It is attached to a wrong place, or its inconsistent with other bindings.
我已经搜索了几个小时,现在正在寻找答案,并且找到了一点帮助。错误消息说它在错误的地方没有意义,因为我相当肯定我的XPath是有效的。另外,“其他绑定”没有意义,因为目前只有一个绑定。