Hi,
I was trying to read XmlSchemaType schema comes with JAXB-RI distro, using
JAXB reflections library. This is the schema fragment I am concerned.
<xs:complexType name="TrackingOrderType">
<xs:sequence>
<xs:element name="shipDate" type="xs:date" minOccurs="0"/>
<xs:element name="orderDate" type="xs:gMonthDay" minOccurs="0"/>
<xs:element name="deliveryDate" type="xs:gMonthDay" minOccurs="0"/>
<xs:element name="trackingDuration" type="xs:duration" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
Assume I have a reference to RuntimePropertyInfo, which represents orderDate
element. When I call runtimePropertyInfo.getSchemaType(), the element
representing orderDate always return null. Then I get a reference to the
type of it by calling RuntimeTypeInfo runtimeTypeInfo =
runtimePropertyInfo.ref() (this return iter and I get the first element).
When I call ((RuntimeBuiltinLeafInfo)
runtimeTypeInfo).getTypeName().getLocalPart() it returns xs:anySimpleType.
But when I debug the same way to tracking duration element,
runtimePropertyInfo.getSchemaType() itself returns xs:duration.
Isn't it that orderTypeRuntimePropertyInfo.getSchemaType() should also
return xs:gMonthDay?
Thanks,
SD