axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Suriarachchi" <>
Subject XML Union type problem
Date Wed, 07 Feb 2007 07:13:31 GMT
Can we use a simple type union as an attribute type? in other words is the
following xmlSchema fragment correct?

  <s:simpleType name="TestUnion">
        <s:union memberTypes="s:string s:int"/>

    <s:complexType name="TestUnionElement">
        <s:attribute type="s0:TestUnion"/>

if so what could be the serialized xml pattern?

I recently implemented the Union type support for adb.
For a example Lets take following schema fragment

    <s:simpleType name="FooOpenEnum">
        <s:union memberTypes="s:int s:string"/>

 <s:element name="Record1">
                <s:element name="elem1" type="s0:FooOpenEnum"/>

for the above schema part the serialized xml is as follows

         <elem1 xsi:type="xs:string>teststring</elem1>

does this xsi:type="xs:string part manadatory? (I think so)

Can someone comment on this?


Amila Suriarachchi,
WSO2 Inc.

View raw message