W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2003

attemting to create a mutli-type element

From: London . <epsilonknot@hotmail.com>
Date: Thu, 04 Dec 2003 01:41:49 +0000
To: xmlschema-dev@w3.org
Message-ID: <LAW11-F40XbY5koTVK40000340a@hotmail.com>

Hi all,

im reasonably new to xsd and im trying to use it to do an inherent datatype 
conversion for me when i read out of a dom. ie>

<element name="data">
    <sequence minOccurs="0">
      <element name="boolean" type="boolean" minOccurs="0" />
      <element name="dateTime" type="dateTime" minOccurs="0" />
      <element name="decimal" type="decimal" minOccurs="0" />
      <element name="short" type="short" minOccurs="0" />
      <element name="int" type="int" minOccurs="0" />
      <element name="long" type="long" minOccurs="0" />
      <element name="string" type="string" minOccurs="0" />

would support the xml:


this works fine, but what i would like to do is have an xsd that could be 
used to validate this:

  <value dt="int">1</value>
  <value dt="string">hello</value>

im at a complete loss here, any help would be appreciated.


STOP MORE SPAM with the new MSN 8 and get 2 months FREE*   
Received on Wednesday, 3 December 2003 20:43:21 UTC

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