[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: minInclusive/maxInclusive don't work for float
Ramesh, I get the same problem. When I tried 23, 0.5, 23.00, 1.0E1, 1.1E1, 23E10 and -0.5 it still validated. When I tried 'hello' I got the following error: "[Error] floattest.xml:5:9: Datatype error: Hello is not a float.." It looks like this facet is not supported in Xerces 1.2. I used the following command and files: command: java sax.SAXCount -v floattest.xml floatTest.xsd <?xml version="1.0"?> <schema xmlns="http://www.w3.org/1999/XMLSchema" targetNamespace="floatTest" xmlns:my="floatTest" elementFormDefault="unqualified" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xsi:schemaLocation= "http://www.w3.org/1999/XMLSchema http://www.w3.org/1999/XMLSchema.xsd"> <!-- ========== --> <simpleType name="myType" base="float" derivedBy="restriction"> <minInclusive value="0.0"/> <maxInclusive value="1.0"/> </simpleType> <element name="x" type="my:myType"/> <!-- ========== --> </schema> floatTest.xml <?xml version="1.0"?> <my:x xmlns:my="floatTest" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xsi:schemaLocation="floatTest floatTest.xsd">23 </my:x> Yours, John F Schlesinger SysCore Solutions 212 619 5200 x 219 917 886 5895 Mobile -----Original Message----- From: Ramesh Gupta [mailto:ramesh@e...] Sent: Friday, October 13, 2000 1:00 PM To: xml-dev@x... Subject: minInclusive/maxInclusive don't work for float In a schema I have: <!-- ========== --> <simpleType name="myType" base="float" derivedBy="restriction"> <minInclusive value="0.0"/> <maxInclusive value="1.0"/> </simpleType> <element name="x" type="my:myType"/> <!-- ========== --> In an instance document, I have: <x>23</x> With Xerces 1.2.0, this is validated without any errors. Any clues, anybody? TIA, Ramesh
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|