This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Can sets have order?
Elliotte Rusty Harold writes:
> >> 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.
> I don't know if he's correct or not, but the eminently respectable C.
> J. Date writes on p. 92 of the sixth edition of his well respected
> text "Introduction to Database Systems":
>
> "2. Tuples are unordered (top to bottom)
>
> This property follows from the fact that the body of the relation is
> a mathematical set; sets in mathematics are not ordered."
In fact, in databases, relations are *multisets*, allowing for
duplicates. I.e., tuples with the same values but different
internal row-ids are allowed.
For XPath/XSL I would say that it is somewhere between sets and
multisets since a result set can contain the same values several times
(obtained from different nodes in the document). Here, the row-id
corresponds to the internal position of the node in the source
document.
E.g., when applying id(...), these duplicates are removed.
Wolfgang
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list