users@jaxb.java.net

Re: How to access the simple element's SchemaType in JAXB 2.0 XJC Plugin

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Tue, 11 Jul 2006 13:03:54 -0700

Peng Kong wrote:
> Hi,
>
> Now, I try to access the original SchemaType information of simple element
> in my plugin. But I can't find any useful method to get them.
> For example, a book schema file
> <xs:element name="book">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="id" type="xs:short" />
> <xs:element name="date" type="xs:dateTime" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
>
> How to get the type information "xs:short" and "xs:dateTime" of relevant
> elements in XJC plugin?

CPropertyInfo.getSchemaComponent() is supposed to work for things like this.

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com