XMLTypeFactoryImpl doesn't support XSD compliant representations of infinity [message #899277] |
Tue, 31 July 2012 06:12  |
Eclipse User |
|
|
|
Hello world,
I use EMF for some kind of technical data editor where i have to support infinite numeric values. XMLTypeFactoryImpl however doesn't support the schema compliant representations of infinite values INF and -INF, it uses Infinity and -Infinity instead: The XML generated by EMF is invalid according to schema rules.
The only solution I found so far is to get the XMLTypePackage from the global package registry and set a new custom XMLTypeFactory for it.
Is this a bug or do I miss something?
|
|
|
|
|
|
|
Re: XMLTypeFactoryImpl doesn't support XSD compliant representations of infinity [message #900446 is a reply to message #900359] |
Tue, 07 August 2012 03:03  |
Eclipse User |
|
|
|
Martin,
XMLTypeFactory is generated with Data Type Converters set to true, so it
generates a full API for all data types, including the primitives. When
reflection is used, all values are passed around as objects, so
primitives are wrapped. Therefore you won't see these methods used
directly by the framework, only when clients call them directly in their
hand written code.
On 06/08/2012 5:36 PM, Martin Weiss wrote:
> Hi Ed,
>
> Ed Merks wrote on Thu, 02 August 2012 04:44
>> The four calls to valueOf could be optimized by storing that value as
>> a static final constant...
>
>
> great idea, thanks!
>
> I noticed there are more conversion methods in XMLTypeFactory:
>
> String convertFloat(float instanceValue);
> String convertDouble(double instanceValue);
> String convertFloatObject(Float instanceValue);
> String convertDoubleObject(Double instanceValue)
>
> It seems these are never called during loading or saving the model.
> What are these methods for? Do I have to override them, too?
>
|
|
|
Powered by
FUDForum. Page generated in 0.03613 seconds