<?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns="http://www.w3.org/1999/xhtml"> <xsl:output method="xhtml" indent="no"/> <xsl:template match="/"> <html> <head><title>Text</title></head> <body> <ol> <xsl:for-each select= "//S"> <li> <xsl:for-each select= "W"> <xsl:apply-templates select="FORM"/> <xsl:if select="not(position()=last())"><xsl:text> </xsl:text></xsl:if> </xsl:for-each> <br/><xsl:apply-templates select="FORM"/> </li> </xsl:for-each> </ol> </body> </html> </xsl:template> </xsl:stylesheet>