Hi,
What should the XML schema eventually look like ?
Cheers
Werner
philipp_s wrote:
> I am trying to create a union between long and an empty string, but only the
> empty string simple type shows up in the xsd that is being created.
>
> This is the code i am using to create the Union:
>
> Union emptyableLongType = new Union(schema);
>
> SimpleType stringType = schema
> .createSimpleType(null,
> simpleTypesFactory
> .getBuiltInType(simpleTypesFactory.getBuiltInTypeName(SimpleTypesFactory.STRING_TYPE)));
> stringType.addFacet(new Facet(Facet.PATTERN,
> ""));
> emptyableLongType.addMemberType(stringType);
> emptyableLongType.addMemberType(longType);
>
> but the resulting type in the schema looks like this:
>
> <xs:element name="some_element" minOccurs="0">
> <xs:simpleType>
> <xs:union>
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:pattern value=""/>
> </xs:restriction>
> </xs:simpleType>
> </xs:union>
> </xs:simpleType>
> </xs:element>
>
> what am I doing wrong? I tried this in the 0.9.6 version we were originally
> using, and also in 1.2 and 1.3 but got the same results.
>
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email