XML Development Forum

Hi, I have an XML file with a large number of terms and abbreviations that I sort and output to a pdf document. The output is sorted nicely but after the last term the whole content is output AGAIN, this time in the order itīs written in the XML. I think I lack the most basics regarding xsl:sort and xsl:apply-templates... :)) Please give me a hint, thanks!