Re: $p:position available everywhere

/ Alessandro Vernet <avernet@orbeon.com> was heard to say:
| On 5/1/07, Innovimax SARL <innovimax@gmail.com> wrote:
|> I submit a proposal to make $p:position available everywhere
|
| Is there any reason why we are using a variable rather than a
| function? I am more used to see host languages expose this type of
| information to XPath with functions rather than variables. For
| instance, XForms has index(..), XSLT has current().

I could go either way on $p:whatever-we-call-it or p:whatever-we-call-it().

When this first came up, Alex suggested that it was easier in most
libraries to add a variable than it was to add a function.

If this position indicator is only available in p:matching-documents,
then I think it can be either. If we decide to make it available in
more places (I'm not yet convinced we should, personally), then I'd
start to think that a function makes more sense.

| Also, I find the naming to be confusing: we can choose a name that
| makes a clearer distinction between what we mean by p:position and the
| XPath position(). We can for instance use the name
| "document-position".

That'd be fine with me.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | On the other hand, you have different
http://nwalsh.com/            | fingers.

Received on Wednesday, 2 May 2007 14:51:37 UTC