Skip to content

Instantly share code, notes, and snippets.

Created January 31, 2011 23:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/805081 to your computer and use it in GitHub Desktop.
Save anonymous/805081 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.0">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:param name="pSortNameAuth" select="'authors'"/>
<xsl:param name="pSortNameYear" select="'dates'"/>
<xsl:param name="pSortNameTitle" select="'titles'"/>
<xsl:param name="pSortPosition" select="1"/>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>Bibliography</title>
</head>
<body>
<xsl:for-each select="//record">
<xsl:sort select=".//*[name()=$pSortNameAuth]/*[position()=$pSortPosition]"/>
<div class="record">
<hr/>
<p><strong>Record Number: </strong> <xsl:value-of select="rec-number"/><br/><br/>
<xsl:value-of select="contributors/authors/author"/>
<xsl:text>. </xsl:text>
<em><xsl:value-of select="titles/title"/>. </em>
<xsl:value-of select="pub-location"/>: <xsl:value-of select="publisher"/>, <xsl:value-of select="dates/year"/>. <xsl:value-of select="pages"/>
</p>
</div>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment