After todays meeting I tried out several XQuery processors and could not find any that would produce -0 for a decimal. "-0E0 cast as xs:decimal" returns 0 Thinking this is a bug or maybe a "MAY" instead of "MUST" I reread the xsd specs again http://www.w3.org/TR/xmlschema-2/#decimal >From close reading I interpret that the value space of decimal can NOT include -0 " The ·value space· of decimal is the set of numbers that can be obtained by multiplying an integer by a non-positive power of ten, i.e., expressible as i × 10^-n where i and n are integers and n >= 0." There is no way to get a -0 from this to my reading. (even though the prior sentence says "decimal represents a subset of the real numbers, which can be represented by decimal numerals." ... the further refinement of the next sentance is fairly clear). so mathematicaly, decimal is a subset of real, but not including -0. Or so I interpret. Now the lexical representation can have a -0 ... but it should not be treated different from 0 same as the example given with precision. " the number 2.0 is not distinct from the number 2.00. " >From this I am forced to conclude that it is an artifact of EXI codec specifications, not a fundamental mathematical principal or based on XSD specs that decimal needs to represent -0. So I suggest any warning we write only go on to state, if anything, that this is a EXI specific representation issue and not suggest there is any other reason for it. ----------------------------------------------------------------------------- David Lee Lead Engineer MarkLogic Corporation dlee@marklogic.com Phone: +1 812-482-5224 Cell: +1 812-630-7622 www.marklogic.com

Im sorry I posted this to the wrong list. ----------------------------------------------------------------------------- David Lee Lead Engineer MarkLogic Corporation dlee@marklogic.com Phone: +1 812-482-5224 Cell: +1 812-630-7622 www.marklogic.com -----Original Message----- From: David Lee [mailto:David.Lee@marklogic.com] Sent: Wednesday, July 17, 2013 3:05 PM To: 'public-xml-er@w3.org' Subject: I think we have decimal all wrong ... After todays meeting I tried out several XQuery processors and could not find any that would produce -0 for a decimal. "-0E0 cast as xs:decimal" returns 0 Thinking this is a bug or maybe a "MAY" instead of "MUST" I reread the xsd specs again http://www.w3.org/TR/xmlschema-2/#decimal >From close reading I interpret that the value space of decimal can NOT include -0 " The ·value space· of decimal is the set of numbers that can be obtained by multiplying an integer by a non-positive power of ten, i.e., expressible as i × 10^-n where i and n are integers and n >= 0." There is no way to get a -0 from this to my reading. (even though the prior sentence says "decimal represents a subset of the real numbers, which can be represented by decimal numerals." ... the further refinement of the next sentance is fairly clear). so mathematicaly, decimal is a subset of real, but not including -0. Or so I interpret. Now the lexical representation can have a -0 ... but it should not be treated different from 0 same as the example given with precision. " the number 2.0 is not distinct from the number 2.00. " >From this I am forced to conclude that it is an artifact of EXI codec specifications, not a fundamental mathematical principal or based on XSD specs that decimal needs to represent -0. So I suggest any warning we write only go on to state, if anything, that this is a EXI specific representation issue and not suggest there is any other reason for it. ----------------------------------------------------------------------------- David Lee Lead Engineer MarkLogic Corporation dlee@marklogic.com Phone: +1 812-482-5224 Cell: +1 812-630-7622 www.marklogic.com