Re: [xsl] position last and attributes

Subject: Re: [xsl] position last and attributes
From: Ihe Onwuka <ihe.onwuka@xxxxxxxxxxxxxx>
Date: Thu, 20 Sep 2012 10:53:30 +0100
On Thu, Sep 20, 2012 at 9:53 AM, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:
>>> The fact the order of attributes cannot be guaranteed has nothing to
>>> do with position() and last(), as by the time those functions get to
>>> be used the order of the node list is known.
>>>
>>
>> My initial post (if you read it again) was to highlight the paradox of
>> being able to apply ordering semantics to something that is
>> intrinsically unordered.
>
> There's nothing to highlight...
>
> - attribute order is not guaranteed: this just means 2 different
> conformant implementations could return attributes in different orders
> to each other (or theoretically even themselves)
>
> - position() returns the position of a node within a node list, last()
> returns the last node in a node list
>
> The two things are unrelated (or orthogonal! knew I would use that
> word one day...)
>

What is orthogonal is the conversation.

You are talking about position() and last() through the prism of the
XPath data model (or specification if it is more accurate to say
that).

If you cast a data model in it's real light; as  an imperfect
abstraction of the real world, then one can see how the imperfections
can lead to paradoxes such as being able to apply a function that has
ordering semantics to another construct  that is intrinsically
unordered.

Let me give a different example.

Where does a circle begin? Does that stop a programming language from
applying a function start() to it's representation of the concept of a
circle and yielding a definitive answer.

Suppose for arguments sake that circle.start() is defined to yield the
northernmost coordinate of the circle. Is that then the universal
truth or have we uncovered a paradox in that something that
definitively has no start or end nonetheless yields a definitive
answer (however derived) when a function start() is applied to it.

Is it important that we can tell the difference?

Current Thread