Bug 6287 - [XPath] Terminology: "undefined"
: [XPath] Terminology: "undefined"
Status: CLOSED FIXED
Product: XPath / XQuery / XSLT
XPath 2.0
: Recommendation
: PC Windows NT
: P2 normal
: ---
Assigned To: Jonathan Robie
: Mailing list for public feedback on specs from XSL and XML Query WGs
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2008-12-08 12:13 UTC by Michael Kay
Modified: 2009-04-01 21:32 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Kay 2008-12-08 12:13:01 UTC
Throughout our specifications, we use the term "undefined", without defining
the term, to mean that a particular variable or property has no value and that
any attempt to access the value is an error. Notably, we use this for the
context item and other parts of the focus, and for the typed value of an
element with element-only content.

This meaning of the term "undefined" is not intuitive, and it runs contrary to
usage in some other standards where it is used to mean something akin to our
"implementation-dependent". Some readers have been known to mistakenly read it
as meaning "not defined in this specification".

If we are going to use the term, we should define what we mean by it.
Preferably, we should use a different term, for example the XSD specifications
use "absent".

I would suggest this as a change to be made across the 2.1/1.1 specifications.
I have raised it against XPath 2.0 for want of a more suitable locus.
Comment 1 Jonathan Robie 2008-12-16 16:55:06 UTC
I prefer to keep the term "undefined" and define it, linking to the definition.

Also, there is no one error code for accessing something that is undefined.
Where it is an error, we provide such an error code.

Jonathan
Comment 2 Michael Kay 2009-01-27 16:07:50 UTC
Action A-384-04

I propose that where we use the word "undefined" we link it to the following
definition:

[Definition: In certain situations a value is said to be *undefined* (for
example, the value of the context item, or the typed value of an element node).
This term indicates that the property in question has no value and that any
attempt to use its value results in an error.]

I will leave it to editors to decide where the definition should be inserted.
Comment 3 Henry Zongaro 2009-02-27 15:10:39 UTC
I understand that at the recent F2F meeting it was decided to add the required
definition of "undefined" to other documents besides XPath and XQuery.  I just
thought I'd record here that Serialization never uses the term.
Comment 4 Sharon Adler 2009-04-01 21:32:31 UTC
The XSL WG accepted MKay's proposal to resolve this bug by accepting the
wording stated in Comment #2 below.


  翻译: