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>

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

instead of:


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"/>

Any suggestion to overcome it instead of:

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


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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:52 UTC