Re: p:input doppelgangers

/ ht@inf.ed.ac.uk (Henry S. Thompson) was heard to say:
| Norman Walsh writes:
|
|> I wonder if it wouldn't be best (and certainly more reasonable for
|> implementors) if we adopted the JAXP strategy and said that the
|> default context is an empty document node instead of an error.
|
| Well, just to clarify, that means that e.g. an XPath of '/' will give
| you the empty string, instead of an error, and count(.) will be 1, and
| so on, right?

Yes. So references to the context will return values instead of
raising an error.

I think I'm comfortable with that. There's nothing that prevents an
implementation from warning about context references when no context
is given.

Most of the time, I think users will specify the context (or get the
right default context) and when they don't, they'll almost always be
using expressions of the form "$foo" which don't refer to the context
anyway.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | Everything should be made as simple as
http://nwalsh.com/            | possible, but no simpler.

Received on Tuesday, 10 July 2007 14:02:33 UTC