<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output method="html" version="1.0" encoding="iso-8859-1" indent="yes"/>
 <xsl:template match="/">
  <html>
   <head>
    <title>Keywords in Catalog &apos;<xsl:value-of select="CatalogType/Catalog"/>&apos;
    </title>
   </head>
   <body>
    <p>Sorted list of Keywords <b>used</b> in catalog &apos;<xsl:value-of select="CatalogType/Catalog"/>&apos;
    </p>
     <xsl:for-each select="CatalogType/MediaItemList/MediaItem/AnnotationFields/Keyword">
      <xsl:sort select="." order="ascending" data-type="text"/>
      <xsl:choose>
       <xsl:when test="position() > 1 and not(. = ./preceding::node())">
         <xsl:value-of select="."/>
		<br></br>
       </xsl:when>
       <xsl:when test="position() = 1">
         <xsl:value-of select="."/>
        <br></br>
       </xsl:when>
      </xsl:choose>
     </xsl:for-each>
   </body>
  </html>
 </xsl:template>
</xsl:stylesheet> 