users@jaxb.java.net

XJC custom extensions

From: Young Matthew (4004) <"Young>
Date: Tue, 10 Aug 2010 10:25:25 +0000

Using lastest jaxb on Java 1.5

The http://valdotech.blogspot.com/2010/01/jaxb-superclass-plugin.html blog post does a decent job of explaning how to fetch custom appinfo definitions but doesn't handle when or why to add a handle (localName/prefix) to the jaxb:extensionBindingPrefixes clause in the schema declaration? For example,

<xs:schema ...... xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" .... jaxb:extensionBindingPrefix="myext....">
....
      <xs:appinfo>
           <myext:whatever attribute="...."/>
      </xs:appinfo>
</xs:schema>

It looks like from the code packaged within JAXB and the example from the blog that CustomizationUtils is used in both cases (prefix added into the extensionBindingPrefix and not)? What is the purpose of the extensionBindingPrefix? Seems like there are very few appinfo examples online shows what the use cases are? Any good doc links would be great....


/ matthew