users@jaxb.java.net

Re: Problem with xs:element->xs:annotation->xs:documentation for a simple type

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Tue, 10 Mar 2009 13:29:36 +0100

Hi.

>> You're creating a new subclass for your "GetLabel"-enabled fields. I
>> don't think it is a good design decision. You'll have to create
>> subclasses for all field classes out there. Essentially, you don't
>> need this: better iterate over outline/class outlines/field outlines
>> and generate additional getters, you don't need special field
>> subclasses for this. This will be much simpler.
>
> OK... Will do. I wasn't trying to win any elegance competition, just trying
> to see if it works at all....

It's not just about elegance, it's exactly about problems like the one
you had with final classes.

>> You can have special-purpose XML customization for your plugin.
>> Imagine something like:
>
>> <xs:element ref="SET:VESSDAT" minOccurs="0">
>> <xs:annotation>
>> <xs:appInfo><my:label>Hello World</my:label></xs:appInfo>
>> </xs:annotation>
>> </xs:element>
>
>> Instead of misusing xs:documentation for your custom purposes.
>
> I have no control over this schema, it is produced by someone else and has
> been in use for years. I just have to use it as is.

Customization elements may be specified outside of the schema, in
binding files (*.xjb).

Bye.
/lexi