<?xml version="1.0"?> <!-- This is a small example XSLT stylesheet transforming ArticleML documents into HTML. The example is incomplete: important things like citation references are still missing. (Exercise to the reader: use xsl:variable, xsl:sort, and xsl:number to finish the parts about citation references.) --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:variable name="style">my-style</xsl:variable> <xsl:output method="html" indent="no"/> <xsl:key name="idkey" match="*[@id]" use="@id"/> <!-- MAIN TEMPLATE --> <xsl:template match="article"> <html> <head> <title><xsl:apply-templates select="title" mode="raw"/></title> <xsl:call-template name="{$style}"/> </head> <body> <xsl:call-template name="header"/> <h1><xsl:apply-templates select="title" mode="raw"/></h1> <xsl:apply-templates select="authors"/> <xsl:apply-templates select="abstract"/> <xsl:apply-templates select="section"/> <xsl:apply-templates select="references"/> <xsl:apply-templates select="vitae"/> </body> </html> <xsl:text> </xsl:text> <xsl:comment>this HTML page was generated by article2html.xsl</xsl:comment> </xsl:template> |