[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: minInclusive/maxInclusive don't work for float

  • From: johns@s... (John F. Schlesinger)
  • To: 'Ramesh Gupta' <ramesh@e...>, xml-dev@x...
  • Date: Wed, 18 Oct 2000 14:02:13 -0400

maxinclusive
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.