Re: Option syntax

/ Jeni Tennison <jeni@jenitennison.com> was heard to say:
|> I think we should say that if an explicit context is not given then
|> there is no context. In that case, any expression that makes reference
|> to the context (by using "/", or position(), or anything else that
|> would refer to the context) is an error.
|
| I'd prefer it to default to the first document on the default readable port.

Ack. No where else do we consider "the first document" of a sequence
as special. I think we should either make it the entire sequence or we
should make it undefined.

Unfortunately, I think this is one of those cases where there's no
technically right answer. It's just a decision we have to make.

My reason for preferring to make the context null is based on two
observations:

1. In the cases where I've been tempted to write

   <p:option name="foo" select="$bar"/>

   it has always been the case that I wanted to copy an existing binding
   or perform some simple context-free string or numeric manipulation.
   So I've never felt a need for the implicit binding.

2. In some implementations, there may be considerable overhead
   associated with constructing such a binding. I'd prefer that the
   user make such a request explicitly rather than implicitly.

Still, it might be more consistent to do as you suggest (modulo the
"first document" exception).

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | Language is by its very nature a
http://nwalsh.com/            | communal thing; that is, it expresses
                              | never the exact thing but a
                              | compromise--that which is common to
                              | you, me, and everybody.--T. E. Hulme

Received on Wednesday, 30 May 2007 15:53:34 UTC