I made some more test and discovered what's wrong.
In the failing simple type, there are similar enumeration elements that
differs only for some characters in the same string position. For example:
<xs:enumeration value="yyyy-MM-dd HH:mm:ss.SSS" />
<xs:enumeration value="yyyy-MM-dd.HH.mm.ss.SSS" />
theese 2 items would have been mapped to the same java enum element
YYYY_MM_DD_HH_MM_SS_SSS, for some reason xjc tool fails without any
error or warning.
Il 13/06/2010 18.22, Wolfgang Laun ha scritto:
> Any simple type derived from xs:string with a set of<xs:enumeration> facets
> results in an enum class, which (obviuosly) must result in a Java class of its
> own.
>
> A simple type derived from xs:string with length, minLength, maxLength
> or pattern facets remains at java.lang.String, because there is no Java
> way of expressing such string subsets, and java.lang.String is a final
> type.
>
> Notice that any checks against the facets are done when you unmarshal
> or marshal with an (un)marshaller that has been given an XML schema
> file.
>
> -W
>
>
> On 13 June 2010 18:06, Ugo Gagliardelli<ugo.gagliardelli_at_gmail.com> wrote:
>> I have and xsd file that contains some simpleTypes, when I run JXCFacade it
>> generate correcty Dateformat and TimeFormat classes, while simply ignore
>> numformat, intformat and datetimeformat, any other type generated class
>> refer to these simpleTypes as String.
>> Is there somewhat I miss? What's wrong?
>> I tried to put the failing types in a xsd file alone too, running JXCFacade
>> against this new xsd it just generete nothing: no episode.xml, no
>> ObjectFactory no source file at all.
>> I tried to change the base restriction to specific xs types as xs:dateTime
>> with pattern facet but the generated java source just ignore patterns and
>> associated properties will be GregorianCalendar without any dateformat
>> restriction, so t's not a choice as well.
>>
>> <xs:simpleType name="numformat">
>> <xs:restriction base="xs:string">
>> <xs:maxLength value="50" />
>> <xs:whiteSpace value="replace" />
>> <xs:pattern value="[0]?[#]{1,15}[.]{1}[#]{0,6}"/>
>> </xs:restriction>
>> </xs:simpleType>
>> <xs:simpleType name="intformat">
>> <xs:restriction base="xs:string">
>> <xs:maxLength value="50" />
>> <xs:whiteSpace value="replace" />
>> <xs:pattern value="[0]?[#]{1,15}"/>
>> </xs:restriction>
>> </xs:simpleType>
>> <xs:simpleType name="dateformat">
>> <xs:restriction base="xs:string">
>> <xs:enumeration value="yyyy-MM-dd" />
>> <xs:enumeration value="MM/dd/yyyy" />
>> <xs:enumeration value="dd.MM.yyyy" />
>> <xs:enumeration value="yyyy-MM-dd" />
>> <xs:enumeration value="yyyy" />
>> <xs:enumeration value="yyyyMM" />
>> <xs:enumeration value="yyyyMMdd" />
>> </xs:restriction>
>> </xs:simpleType>
>> <xs:simpleType name="timeformat">
>> <xs:restriction base="xs:string">
>> <xs:enumeration value="HH:mm:ss.SSS" />
>> <xs:enumeration value="HH:mm:ss.SS" />
>> <xs:enumeration value="HH:mm:ss.S" />
>> <xs:enumeration value="HH:mm:ss" />
>> <xs:enumeration value="HH:mm" />
>> <xs:enumeration value="HH" />
>> </xs:restriction>
>> </xs:simpleType>
>> <xs:simpleType name="datetimeformat">
>> <xs:restriction base="xs:string">
>> <xs:enumeration value="yyyy-MM-dd HH:mm:ss.SSS" />
>> <xs:enumeration value="yyyy-MM-dd.HH.mm.ss.SSS" />
>> <xs:enumeration value="yyyy-MM-dd HH:mm:ss" />
>> <xs:enumeration value="yyyy-MM-dd.HH.mm.ss" />
>> <xs:enumeration value="yyyy-MM-dd HH:mm" />
>> <xs:enumeration value="yyyy-MM-dd.HH.mm" />
>> <xs:enumeration value="yyyy-MM-dd HH" />
>> <xs:enumeration value="yyyy-MM-dd.HH" />
>> </xs:restriction>
>> </xs:simpleType>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
>> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>