Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 359412

Summary: XSD to Ecore does not handle xsd:float's special value "INF"
Product: [Modeling] EMF Reporter: Waqas Ilyas <waqas.ilyas>
Component: XML/XMIAssignee: Ed Merks <Ed.Merks>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Waqas Ilyas CLA 2011-09-29 08:28:33 EDT
Build Identifier: I20100608-0911

If I try to specify an attribute in my XML Schema similar to the example below:
<xs:attribute name="someFloat" type="xs:float" default="INF"/>

The genmodel editor gives error that "INF" is an invalid literal. However, this is a valid literal according XSD specifications (along with INF). The other special values "NaN", 0 and -0 work without any problems.

A work around is that I use "Infinity" as the default value. This works with genmodel. However, my XSD editor fails validation because "Infinity" is not a valid literal value for a schema type float.

Reproducible: Always

Steps to Reproduce:
1. Add an attribute in XML schema that has type "float" and default value "INF"
2. Generate a genmodel based on the schema.
3. The genmodel editor will give error that INF is an invalid value.
Comment 1 Ed Merks CLA 2011-10-27 08:10:25 EDT
The fix is committed to CVS for 2.8.
Comment 2 Ed Merks CLA 2011-11-22 05:26:47 EST
The changes are available in builds.