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:pattern value="[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]"/> </xsd:restriction> </xsd:simpleType> <xsd:element name="num" type="numType ----------------------------------------------------------------- Now, here is an example of an instance of "num": <num>32</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? /RogerReceived on Friday, 9 May 2003 19:44:18 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 16 March 2009 11:13:27 GMT