85 lines
2.6 KiB
XML
85 lines
2.6 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
|
<xsl:output method="html" version="4.01" encoding="UTF-8" indent="yes"/>
|
|
<xsl:template match="/">
|
|
<html>
|
|
<head>
|
|
<title>OrganLit - Works By Book</title>
|
|
</head>
|
|
<body>
|
|
<h1>Works By Book</h1>
|
|
<xsl:for-each select="//OrganLit/Books/Book">
|
|
<xsl:sort select="Composer/ComposerName"/>
|
|
<xsl:sort select="current()[Composer/ComposerName='']/Publisher/PublisherName"/>
|
|
<xsl:sort select="BookTitle"/>
|
|
<xsl:call-template name="FormatBook"/>
|
|
</xsl:for-each>
|
|
<br/>
|
|
<br/>
|
|
<a href="index.htm">OrganLit Home</a>
|
|
</body>
|
|
</html>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="FormatBook">
|
|
<p>
|
|
<br><b>
|
|
<a name="{current()/BookID}"/>
|
|
<xsl:call-template name="FormatBookTitleAndLocation"/>
|
|
</b></br>
|
|
<xsl:for-each select="../../Works/Work[BookID=current()/BookID]">
|
|
<xsl:sort select="PageNumber" data-type="number"/>
|
|
<xsl:call-template name="FormatWorks"/>
|
|
</xsl:for-each>
|
|
</p>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="FormatWorks">
|
|
<br>
|
|
<xsl:choose>
|
|
<xsl:when test="PageNumber=''"/>
|
|
<xsl:when test="PageNumber='0'"/>
|
|
<xsl:otherwise>
|
|
<xsl:text> p. </xsl:text><xsl:value-of select="PageNumber"/><xsl:text> </xsl:text>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
<xsl:text>"</xsl:text><xsl:value-of select="WorkName"/>
|
|
<xsl:if test="OpusInfo!=''"><xsl:text> - </xsl:text><xsl:value-of select="OpusInfo"/></xsl:if>
|
|
<xsl:text>"</xsl:text>
|
|
<xsl:text> </xsl:text>
|
|
<xsl:if test="ComposerID!=current()/Book/ComposerID">
|
|
<xsl:value-of select="Composer/ComposerName"/>
|
|
<xsl:text> </xsl:text>
|
|
</xsl:if>
|
|
</br>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="FormatBookTitleAndLocation">
|
|
<i><xsl:value-of select="BookTitle"/></i><xsl:text> </xsl:text>
|
|
<xsl:choose>
|
|
<xsl:when test="ComposerID=''">
|
|
<xsl:choose>
|
|
<xsl:when test="PublisherID=''">
|
|
<xsl:text>(Collection)</xsl:text>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:text>(Collection - </xsl:text><xsl:value-of select="Publisher/PublisherName"/><xsl:text>)</xsl:text>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:value-of select="current()/Composer/ComposerName"/>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
<xsl:choose>
|
|
<xsl:when test="PublisherStreamingAllowed=''">
|
|
<xsl:text> - Publisher Streaming Allowed Unknown</xsl:text>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:text> - Publisher Streaming Allowed </xsl:text><xsl:value-of select="Publisher/PublisherStreamingAllowed"/>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:template>
|
|
|
|
</xsl:stylesheet>
|