users@jaxb.java.net

Re: Réf. : Re: Plugin problem

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Wed, 17 Aug 2005 15:27:06 +0200

Hi.

> I have another question, about the API.
>
> Consedering the schema fragment :
>
> <xs:simpleType name="Length">
> <xs:restriction base="xs:double"></xs:restriction>
> </xs:simpleType>
>
> <xs:complexType>
> <xs:sequence>
> <xs:element name="Test" type="Length" />
> ...
>
> In my plugin when I visit the model, I can see in the properties that there
> is a property "Test" with type "double".
> Is there a way to know at the plugin level, that the xml type is "Length" ?
> I would like to use this info to annotate the generated code.
> I could use appinfo customization in the schema but it would be heavier.
> (It seems I cannot customize the simpleType)

Sorry, I'm not yet that much into JAXB 2 internals. Most of my know-how
is of JAXB 1.0. As far as I know, JAXB 2 keeps schema info in the
attached XSOM, but I have not experimented with it myself.

If you find your way through, would you mind posting the piece of code?
Thanks.

Bye.
/lexi