[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: [xslt-conformance] xsl:number issue: value set to non-number
The Xalan test numbering79 contains this instruction: <xsl:number format="(1) " value="wiseguy" /> Jonas Sicking pointed out the erratum E24... # It is an error if the number is NaN, infinite or less than 0.5; an # XSLT processor may signal the error; if it does not signal the error, # it must recover by converting the number to a string as if by a call # to the string function and inserting the resulting string into the # result tree >However the XSLT2 spec says to also include the head and tail of the >format-attribute. I think the XSLT2 wording could be improved, but we can't depend on it for XSLT1 anyway. Earlier in the erratum, it says that the expression given in the value attribute must be converted to a number, which would make any string that can't convert into "NaN". Xalan puts out a zero, but I think we should put out a string. Now the issue remains: should that be "NaN" or "(NaN)"? I think the above erratum has leeway because it doesn't say whether "resulting string" must always be formatted, or maybe inserting it into the tree means inserting in the middle of a stream of text that already has the ( and ) inserted separately. What do you think, and why? A) It should be (NaN); anything gets formatted B) It should be NaN; that's the "resulting string" C) Some other output? D) Must refer this to the XSL WG for resolution The fact that XSLT2 gives clear direction for choice A could be taken as an indication that we should opt for D and quickly (?) get a new erratum, which is likely to require A. There will be several more issues to follow, so we can bundle all our xsl:number issues that need referral. ................David Marston
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC