W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2001

Union of Mixed Type

From: Zhanshou Yu <zyu@prosrm.com>
Date: Thu, 19 Jul 2001 15:05:30 -0400 (EDT)
Message-ID: <F244D00764E76A4CB774BE7D4CB5BE04C330FF@pros-mail2.prosrm.com>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:23 GMT