Re: [xml] XPath numbers and exponential notation



Daniel Veillard wrote:

  But it really depends on how other implementations did. I would prefer
a clean way but if others processors have extended the number production,
then we should accept their input. But we should not incitate people to
write stylesheet which are not proper per the standard.

I think this discussion is missing the important point. The XPath 1.0
standard is inadequate (and I regard the XPath 2.0 requirement to support
scientific notation as an acknowledgement of this) because it allows
garbage in the results. I do not expect any consistant behaviour from
other implemenations because of this.

Standard compliancy is definitely a good thing, but we should also keep
in mind that the W3C standards are created much faster than other standards
and thus more error-prone (the XSLT standard is another example of where
number formatting is inadequately described).

If people want a strictly XPath 1.0 conforming behaviour which allow
garbage in the results, I have no objections (you have to modify
xmlXPathStringEvalNumber, xmlXPathCompNumber, and xmlXPathFormatNumber
in order to do so), but I am perfectly happy with the current solution,
so I don't plan to make any such modifications myself.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]