users@jaxb.java.net

Unable to honor plugin customizations

From: Burnett, Adam <Adam.Burnett_at_idearc.com>
Date: Wed, 12 Mar 2008 14:42:58 -0400

I wrote a plugin which looks for <replace> tags in the schema to do some
post processing on the generated classes. It works fine when there is
one <replace> tag but gives the following error when I try and use
multiple tags:

"compiler was unable to honor this mr:replace customization. It is
attached to a wrong place, or its inconsistent with other bindings."

Here is a snippet from my schema (CDATA body excluded for brevity):
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
 xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
 xmlns:mr="http://jaxb2-commons.dev.java.net/plugin/method-replacer"
 targetNamespace="..."
 xmlns="..."
 jxb:version="2.1"
 jxb:extensionBindingPrefixes="mr">
.
.
.
<xs:complexType name="addressInfo">
<xs:annotation><xs:appinfo>
  <mr:replace>
    <name>setLatitude</name>
    <method><![CDATA[ ... ]]></method>
  </mr:replace>

  <mr:replace>
    <name>setLongitude</name>
    <method><![CDATA[ .. ]]></method>
  </mr:replace>
</xs:appinfo></xs:annotation>
<xs:all>
   <xs:element name="latitude" type="xs:string/> ...etc
</xs:complexType>

In my plugin I am calling markAsAcknowledged for each customization.

Would this be caused by how I'm parsing through the customizations in my
plugin or do I have to do something else to enable to me to specify
multiple customizations like this?

-Adam