This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
fn-insert-before-mix-args-010's query reads: fn:insert-before( ("a", "b", "c"),2, xs:float("-0")) the expected base line is: "a 0 b c" To me this seems wrong. 17.1.2 Casting to xs:string and xs:untypedAtomic reads: "If SV has the value positive or negative zero, TV is "0" or "-0" respectively." Saxon evaluates the above to "a -0 b c", which is what I would expect. In revision 1.5 of the file, the baseline changed from -0.0E0 to 0, without documenting why: http://dev.w3.org/cvsweb/2006/xquery-test-suite/TestSuiteStagingArea/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqInsertBeforeFunc/fn-insert-before-mix-args-010.txt.diff?r1=1.4&r2=1.5&f=h Frans
To be a bit more specific: the baseline reading "a 0 b c" should be removed, unless I'm not mistaken.
IIRC the spec says that when casting the string "-0" to float, it's implementation-defined whether you get negative or positive zero. (The reason is to do with the fact that Schema 1.0 doesn't have a distinct negative zero in the value-space) The change from 0.0e0 to 0 was to fix a bug: floating point zero when converted to a string should give you "0".
Ok. In that case the paragraph in 17.1.2 contradicts it, since it makes a distinction for positive and negative zero. It would be cool with a pointer to where it's mentioned how this serialization is implementation defined. Maybe a candidate for errata. Frans
Mike, section 17.1.2 Casting to xs:string and xs:untypedAtomic reads: If ST is xs:float or xs:double, then: If SV has the value positive or negative zero, TV is "0" or "-0" respectively. doesn't this mandate that xs:float("-0") must serialize to "-0"?
xs:float("-0") is allowed to return positive or negative zero. This was decided because XML Schema 1.0 doesn't actually recognize negative zero. If it returns negative zero then it must serialize as "-0"; if it returns positive zero then it must serialize as "0". Michael Kay
I see. Rejecting.