[xsl] Can sets have order?

Subject: [xsl] Can sets have order?
From: Uche Ogbuji <uche.ogbuji@xxxxxxxxxxxxxxx>
Date: Thu, 25 Jan 2001 07:49:55 -0700
> I'd also agree with my original statement. Terminology isn't always
> consistently applied.

Agreed here, but I can't think of a respectable terminology that restricts 
sets to be unordered.

> > A set can be ordered or unordered. 
> A set as defined in most set theories doesn't have any concept of order.

This is not true.  If youopen almost any discrete math book, you'll find in 
the first chapter discussions of the set of integers I, of real numbers R, etc.

Are you seriously tellimg me that those sets are not ordered?

The concept of order is not a fundamental concept of set theory, but that does 
not mean that sets cannot have order.

> Now you can of course have a set with an order (or often a set with a
> partial order: `poset') this formally is a pair consisting of a set and
> an ordering relation.

Oh really?  By this bizarre logic, numbers do not have representation (what 
human being consider numbers are formally a collection of the abstraction 
representing the quantity, the many representations for those numbers, and 
whatever other weird combination you can conjure up.

> However the common name for the pair is "ordered
> set" so you end up with the fact that it's a reasonable position
> to use the word "set" in either way. You just need to define your terms.

Agreed.  But that's not what you were saying.  You were saying that a set 
cannot have order.  Period.  I don't think you've demonstrated this by any 

> And in the case of XSL I'd claim that "set" is used in the way I
> indicated.

I'd claim otherwwise.

> When talking about document order or reverse document order in XSLT
> this is always a relation that is _applied_ to a node set, it is not an
> intrinsic property of the node set itself, in the way that the order is
> an intrinsic propoerty of an ordered set. 

No.  This would maybe make sense if there were functions such as 
sort-by-node-name() on a node set.

Can you cite anything in the spec that indicates that the order is not 

> It is not possible to have two different node sets with the same
> underlying collection of nodes, but different orderings as would be the
> case if ordered sets were your underlying model.

I'm sorry, but I think you draw a false conclusion from your premise.  In 
fact, I think the premise proves that node sets are ordered sets, not 
unordered sets, as you claim.

According to your claims, one should be able to impose an arbitrary ordering 
on a set as an extrinsic property, but this is not the case for node sets.

I'd say that proves my point (that the ordering is intrinsic).

Uche Ogbuji                               Principal Consultant
uche.ogbuji@xxxxxxxxxxxxxxx               +1 303 583 9900 x 101
Fourthought, Inc.                         http://Fourthought.com 
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread