> course it's easier in xslt where you can go <xsl:for-each > select="( 'cat', 'dog', 'apple')"> <xsl:sort select="."/> > <word n="{position()}"><xsl:value-of select="."/></word> Yes, but we're on an XQuery list so let's be polite. Michael Kay