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

Are all values stored as strings?

From: Roger L. Costello <costello@mitre.org>
Date: Fri, 09 May 2003 16:50:22 -0400
Message-ID: <3EBC148E.440C1DC9@mitre.org>
To: xmlschema-dev@w3.org, "Costello,Roger L." <costello@mitre.org>

Hi Folks,

Consider these two ways of defining an element called "num":

Version #1:

<xsd:element name="num" type="xsd:unsignedByte"/>

Version #2:

<xsd:simpleType name="numType">
    <xsd:restriction base="xsd:string">

<xsd:element name="num" type="numType

Now, here is an example of an instance of "num":


Question: is it correct that num's value (32) is always represented as a
"string", regardless of how num is declared?  That is, are all values
just strings, with a "datatype label" associated with the string?

Let me ask it another way, is the value (32) represented by an XML
Schema validator as this:

   0010 0000

if "num" is declared using Version #1

and like this: 

   0011 0010

if "num" is declared using Version #2?

Received on Friday, 9 May 2003 19:44:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:01 UTC