Created
January 14, 2013 10:27
-
-
Save justonefixxxx/4529146 to your computer and use it in GitHub Desktop.
2013-01-14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output method="html" /> | |
<xsl:template match="/"> | |
<html> | |
<body> | |
<header id="header"> | |
<h1>library</h1> | |
</header> | |
<section id="middle"> | |
<div id="container"> | |
<div id="content"> | |
<xsl:for-each select="library/book"> | |
<ul><xsl:attribute name="id"><xsl:value-of select="@id" /> | |
</xsl:attribute> | |
<li><h2> | |
<xsl:value-of select="title"/></h2> | |
</li> | |
<li class="author"> | |
<xsl:value-of select="author"/> | |
</li> | |
<li class="description"> | |
<xsl:value-of select="description"/> | |
</li> | |
<li class="release"> | |
<xsl:value-of select="release"/> | |
</li> | |
</ul> | |
</xsl:for-each> | |
</div> | |
</div> | |
<aside id="sideLeft"> | |
<xsl:apply-templates select="/library/book" /> | |
</aside> | |
</section> | |
</body> | |
</html> | |
</xsl:template> | |
<xsl:template match="book"> | |
<ul> | |
<li class="tableofcontents"><a> | |
<xsl:attribute name="href">#<xsl:value-of select="@id" /> | |
</xsl:attribute> | |
<xsl:value-of select="title" /> | |
</a></li> | |
</ul> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment