xsl-list
[Top] [All Lists]

Re: [xsl] position last and attributes

2012-09-20 04:53:41
On Thu, Sep 20, 2012 at 9:53 AM, Andrew Welch 
<andrew(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com> 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?

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--