私はカスタマイズを使用するXJCプラグインを開発しています。問題は、私はここでXJCプラグインのカスタマイズ
[ERROR] compiler was unable to honor this myPlugin:testAnnotation customization. It is attached to a wrong place, or its inconsistent with other bindings.
line 16 of file:/C:/JaxbPlugin_jar/withInternalBinding/sampleInlineAnnotation.xsd
[ERROR] (the above customization is attached to the following location in the schema)
line 13 of file:/C:/JaxbPlugin_jar/withInternalBinding/sampleInlineAnnotation.xsd
を取得するのは、私のスキーマです:
<?xml version='1.0' ?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:myPlugin="http://www.example.org"
targetNamespace="http://www.books.org"
xmlns="http://www.books.org"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
jaxb:extensionBindingPrefixes="xjc myPlugin"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
jaxb:version="2.1">
<xs:element name="a" type="xs:string">
<xs:annotation>
<xs:appinfo>
<myPlugin:testAnnotation>test</myPlugin:testAnnotation>
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:schema>
私はそう
- 「それが接続された外部結合の構成(なし-bオプション)を使用していませんよ間違った場所 "
- " 他のバインディングと矛盾しています " - カスタマイズは1つしかなく、外部biは使用しませんファイルがありません
だから、<myPlugin:testAnnotation>test</myPlugin:testAnnotation>
は間違った場所にあるようです。しかし、それは注釈タグの中にあり、なぜ動作しないのかわかりません。
どのようなプラグインを開発していますか? – lexicore
@lexicoreこれは内部使用のためのプラグインであり、多重化されています。私はxjc用のプラグインがあることを知っていて、それらのうちのいくつかはあなたによって書かれています=) – aderesh