See for example the definition given here: http://mathworld.wolfram.com/LexicographicOrder.html
Mathematica rules! XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list