1<?xml version='1.0'?> 2 3<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> 4<xsl:output method="xml" indent="yes"/> 5<xsl:template match="/"> 6<indexdoc> 7<xsl:apply-templates select="//indexterm"> 8<xsl:sort data-type="text" select="primary"/> 9</xsl:apply-templates> 10</indexdoc> 11</xsl:template> 12 13 14<xsl:template match="indexterm"> 15<primaryterm><xsl:value-of select="primary"/></primaryterm> 16</xsl:template> 17 18 19</xsl:stylesheet> 20