Union of Mixed Type

Hi,

We have a client who requires that if the value of an element is null, then
put a space('  ') instead. For example:

instead of:

<Age></Age>

They'd like to show as

<Age>   </Age>

I'd like to define this element as : "xsd:int" but the stupid space will
kill me.


I know the following is illegal:

    <xsd:simpleType name="intergerOrSpace">
        <xsd:restriction base="xsd:string"> ??????
            <xsd:enumeration value=" "/>
            <xsd:enumeration value="xsd:int"/>
        </xsd:restriction>
    </xsd:simpleType>       

Any suggestion to overcome it instead of:


    <xsd:simpleType  name = "intergerOrSpace">
      <xsd:restriction base="xsd:string">
          <xsd:pattern value="(    )|([0-9]*)"/>  
      </xsd:restriction>
    </xsd:simpleType>

Thanks!!

-------------------------------------------------------------------
Zhanshou Yu
PROS Revenue Management
Email:  zyu@prosrm.com
Tel.   :  713-335-8040


---------
This e-mail is for the designated recipient only and may contain privileged
or confidential information. If you have received it in error, please notify
the sender immediately and delete the original. Any other use of this e-mail
is prohibited.

Received on Wednesday, 22 August 2001 05:42:05 UTC