Subject: Re: [xsl] Can sets have order? From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 25 Jan 2001 15:24:26 GMT 
> This is not true. If youopen almost any discrete math book, ah but what about books on set theory... > Are you seriously tellimg me that those sets are not ordered? yes. The underlying set is unordered. The structure usually called, say, the real numbers has a lot more than just the set, it's an ordered field, so it has the set, an ordering, a multiplication ,etc.. > The concept of order is not a fundamental concept of set theory, but that does > not mean that sets cannot have order. A set can have an order in the way I can have a coat. If I change the coat I'm still me. That is not the same as an ordered set which is a different beasty altogether: if you change the order you have a different ordered set. > Can you cite anything in the spec that indicates that the order is not > intrinsic? Mainly of course we are just arguing about words, for the fun of it, but if one was constructing ordered sets I would expect ancestor::* to construct the set of ancestors with reverse document ordering, but it doesn't. It just constructs the set of ancestors. Now given a set there is (in XSLT 1.x) only one possible ordering you can apply, namely document order, so whether that property is intrinsic or applied makes no practical difference, except for the way you describe things. I'd say that <xsl:variable name="x" select=" ancestor::*"/> constructs the set, and that <xsl:foreach select="$x"> steps through that set in document order. You'd presumably say that the variable constructed the node set in document order (as you want the sets to always be ordered), and then foreach does the obvious thing. Now clearly in an implementation a set is probably implemented as some kind of list and so is ordered, so probably the implementation follows your model, but that's an implementation detail, I've been a pure mathematician too long to worry about implementation details:) David XSLList info and archive: http://www.mulberrytech.com/xsl/xsllist
Current Thread 


< Previous  Index  Next > 

RE: [xsl] Can sets have order?, Michael Kay  Thread  Re: [xsl] Can sets have order?, Uche Ogbuji 
Re: [xsl] Can sets have order?, Elliotte Rusty Harol  Date  RE: [xsl] lists, DPawson 
Month 