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是有效的。另外,「其他綁定」沒有意義,因爲目前只有一個綁定。