<?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:preserve-space elements="*" /> <xsl:template match="/registry"> <!-- Build the front --> <font face="Courier-New; monospace"> <p> <xsl:value-of select="@title" /><br /> <pre> <code><xsl:value-of select="fore/comment/t" /></code> </pre> </p> <!-- Build the table header --> <table> <tr> <td></td> <td><xsl:value-of select="namespace/template/@commentText" /></td> <td>Reference</td></tr> <tr> <td><code>-----</code></td> <td><code>-----------------------------------------------------</code></td> <td><code>---------</code></td> </tr> <!-- Build the data table --> <xsl:apply-templates select="namespace/block" /> <!-- Close the data table --> </table> <!-- Build the reference citation --> <xsl:apply-templates select='document(//citation[@contentType="text/xml"]/@uri)/reference' /> <!-- Output the Date --> <p>(last updated <xsl:value-of select="fore/date/@month" /> <xsl:text> </xsl:text><xsl:value-of select="fore/date/@day" /> <xsl:text> </xsl:text><xsl:value-of select="fore/date/@year" />) </p> <p>[]</p> </font> </xsl:template> <!-- Process Each Entry in Namespace --> <xsl:template match="namespace/block"> <xsl:for-each select="entry"> <tr> <td><xsl:value-of select="key" /></td> <td><xsl:value-of select="comment/t" /></td> <td><xsl:value-of select="citation[1]" /></td> <td></td> </tr> </xsl:for-each> </xsl:template> <!-- Build Citation Entry --> <xsl:template match="reference"> <p> <table width="400"> <tr> <td valign="top"> [<xsl:value-of select="/reference/@anchor"/>]</td> <td> <xsl:for-each select='//author'> <xsl:choose> <xsl:when test="position()=1"> <xsl:value-of select="@surname" /> <xsl:text>, </xsl:text> <xsl:value-of select="@initials" /> <xsl:text>, </xsl:text> </xsl:when> <xsl:when test="position()=last()"> <xsl:text> and </xsl:text> <xsl:value-of select="@initials" /> <xsl:text> </xsl:text> <xsl:value-of select="@surname" /> <xsl:text>, "</xsl:text> </xsl:when> <xsl:otherwise> <xsl:value-of select="@initials" /> <xsl:text> </xsl:text> <xsl:value-of select="@surname" /> <xsl:text>, </xsl:text> </xsl:otherwise> </xsl:choose> </xsl:for-each> <xsl:value-of select="front/title" /> <xsl:text>", </xsl:text> <xsl:value-of select='seriesInfo[@name="RFC"]/@name' /> <xsl:text> </xsl:text> <xsl:value-of select='seriesInfo[@name="RFC"]/@value' /> <xsl:text>, </xsl:text> <xsl:for-each select='//author'> <xsl:value-of select='organization'/> <xsl:text>, </xsl:text> </xsl:for-each> <xsl:value-of select='front/date/@month' /> <xsl:text> </xsl:text> <xsl:value-of select='front/date/@year' /> <xsl:text>.</xsl:text> </td> </tr> </table> </p> </xsl:template> </xsl:stylesheet>