[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Handling of "error value" in XPATH 2.0
These recent threads on XPATH 2.0 got me to start reading the draft. I was alarmed by the backwards incompatibilities, and yet I can see why many of them could be thought necessary for use by XQuery. I also noticed something else, and I'd like some assurance that it isn't a problem, or else that it will be handled. I'm referring to "error value", which will sometimes be returned by XPATH 2.0 expressions. I haven't found any place in the draft that says anything about how the "error value" is to be handled. In particular, nothing says that you can test whether the returned value is the "error value". For example, a boolean test won't evaluate to either true or false (nor necessarily the error value either, depending on the test) when the value tested is the "error value", as best as I can see. How then can we make use of this error value? This needs to be specified. Thank goodness, the results of performing a logical test (and | or) where an operand is the error value is specified (section 2.7). But even here, if one operand is false and the other is the error value, the result can either be false or the error value. The result should be specified definitively, so that one can know how to test for it. We don't need options here. Fortunately, the "not" operator is specified to return the error value if fed an error value. The xslt 2.0 draft does not even mention "error value", let alone how to test for it. It does say what the processor should or may do if there is an error condition, but that is different as far as I can see. Again, the Functions and Operators draft does not specify how what a not(), less than, or greater than should return if an operand is the error value. And again, what is the required behavior when an if-then-else expression encounters the error value? It is not specified. I imagine that the WG members have a clear idea of how to work with "error value". I'm just insisting that it has to spelled out in the Recs, and preferably without options. Is this an important oversight that should be posted to the XPATH comments list, or am I being overly concerned about a matter of no real significance? Cheers, Tom P
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|