home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:output method="html" version="1.0" indent="yes" encoding="UTF-8" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
- <xsl:template match="/plist/dict">
- <!-- Root HTML -->
- <html>
- <head>
- <!--<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />-->
- <meta http-equiv="Content-Style-Type" content="text/css" />
- <title><xsl:apply-templates select="key[text()='Title']" /></title>
- <link rel="stylesheet" type="text/css" href="parts/datadisc.css" media="all" />
- </head>
- <body>
- <div class="center">
- <table class="layout" summary="layout">
- <tr><td class="header">
- <img class="baricon" src="parts/discicon.png" width="32" height="30" />
- <div class="header"><xsl:apply-templates select="key[text()='Title']" /></div>
- <div class="headerlink">
- <xsl:element name="a">
- <xsl:attribute name="target">_blank</xsl:attribute>
- <xsl:attribute name="href"><xsl:apply-templates select="key[text()='PicturesFolderPath']" /></xsl:attribute>
- <img class="icon" src="parts/folder.png" width="16" height="16" />
- <img class="margin" src="parts/space.png" width="4" height="16" />
- <xsl:apply-templates select="key[text()='PicturesFolderText']" />
- </xsl:element>
- </div>
- </td></tr>
- <tr><td class="layout">
- <xsl:if test="key[text()='PageLinks'] != ''">
- <xsl:apply-templates select="key[text()='PageLinks']/following-sibling::node()[1]" mode="PageLinks" />
- </xsl:if>
- <xsl:call-template name="Navigator" />
- </td></tr>
- <tr><td class="thumbnails">
- <xsl:apply-templates select="key[text()='Thumbnails']/following-sibling::node()[1]" mode="Thumbnails" />
- </td></tr>
- <tr><td class="layout">
- <xsl:if test="key[text()='PageLinks'] != ''">
- <xsl:apply-templates select="key[text()='PageLinks']/following-sibling::node()[1]" mode="PageLinks" />
- </xsl:if>
- <xsl:call-template name="Navigator" />
- </td></tr>
- <tr><td class="footer">
- <img class="baricon" src="parts/pmbicon.png" width="32" height="30" />
- <div class="footer">Picture Motion Browser</div>
- </td></tr>
- </table>
- </div>
- </body>
- </html>
- </xsl:template>
-
- <xsl:template name="Navigator">
- <xsl:variable name="PreviousPage">
- <xsl:apply-templates select="key[text()='PreviousPage']" />
- </xsl:variable>
- <xsl:variable name="NextPage">
- <xsl:apply-templates select="key[text()='NextPage']" />
- </xsl:variable>
-
- <!-- Navigator HTML -->
- <div class="navigator">
- <xsl:choose>
- <xsl:when test="$PreviousPage != ''">
- <xsl:element name="a">
- <xsl:attribute name="href"><xsl:value-of select="$PreviousPage"/></xsl:attribute>
- <img class="icon" src="parts/prev.png" width="16" height="16" />
- </xsl:element>
- </xsl:when><xsl:otherwise><img class="margin" src="parts/space.png" width="16" height="16" /></xsl:otherwise>
- </xsl:choose>
- <img class="margin" src="parts/space.png" width="16" height="16" />
- <xsl:choose>
- <xsl:when test="$NextPage != ''">
- <xsl:element name="a">
- <xsl:attribute name="href"><xsl:value-of select="$NextPage"/></xsl:attribute>
- <img class="icon" src="parts/next.png" width="16" height="16" />
- </xsl:element>
- </xsl:when><xsl:otherwise><img class="margin" src="parts/space.png" width="16" height="16" /></xsl:otherwise>
- </xsl:choose>
- </div>
- </xsl:template>
-
- <xsl:template match="dict" mode="pagelink">
- <!-- PageLink HTML -->
- <xsl:variable name="Type">
- <xsl:apply-templates select="key[text()='Type']" />
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$Type = 'OmitSeparator'">
- <xsl:text> ... </xsl:text>
- </xsl:when><xsl:when test="$Type = 'Separator'">
- <xsl:text> | </xsl:text>
- </xsl:when><xsl:otherwise>
- <xsl:variable name="Page">
- <xsl:apply-templates select="key[text()='Page']" />
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$Page != ''">
- <xsl:element name="a">
- <xsl:attribute name="href"><xsl:value-of select="$Page"/></xsl:attribute>
- <xsl:apply-templates select="key[text()='Label']" />
- </xsl:element>
- </xsl:when><xsl:otherwise>
- <span class="currentpage"><xsl:apply-templates select="key[text()='Label']" /></span>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="dict" mode="thumbnail">
- <!-- Thumbnail cell HTML -->
- <td class="thumbnail">
- <div class="thumbnail">
- <xsl:element name="a">
- <xsl:attribute name="href"><xsl:apply-templates select="key[text()='Path']" /></xsl:attribute>
- <xsl:attribute name="class">thumbnail</xsl:attribute>
- <xsl:element name="img">
- <xsl:attribute name="class">thumbnail</xsl:attribute>
- <xsl:attribute name="src"><xsl:apply-templates select="key[text()='Thumbnail']" /></xsl:attribute>
- <xsl:attribute name="height"><xsl:apply-templates select="key[text()='ThumbnailHeight']" /></xsl:attribute>
- <xsl:attribute name="width"><xsl:apply-templates select="key[text()='ThumbnailWidth']" /></xsl:attribute>
- <xsl:attribute name="alt">
- <xsl:apply-templates select="key[text()='Description']" />
- <xsl:text> </xsl:text>
- <xsl:apply-templates select="key[text()='Date']" />
- <xsl:text> </xsl:text>
- <xsl:apply-templates select="key[text()='Time']" />
- </xsl:attribute>
- </xsl:element>
- <span class="information">
- <xsl:apply-templates select="key[text()='Description']" /><br/>
- <xsl:apply-templates select="key[text()='Date']" />
- <xsl:text> </xsl:text>
- <xsl:apply-templates select="key[text()='Time']" />
- </span>
- </xsl:element>
- </div>
- </td>
- </xsl:template>
-
- <xsl:template name="OutputEmptyCol">
- <!-- Empty cell HTML -->
- <td class="empty">
- </td>
- </xsl:template>
-
- <xsl:template match="*" mode="PageLinks">
- <div class="pagelinks">
- <xsl:call-template name="PageLinksLoop">
- <xsl:with-param name="index" select="0" />
- <xsl:with-param name="count" select="count(dict)" />
- </xsl:call-template>
- </div>
- </xsl:template>
-
- <xsl:template name="PageLinksLoop">
- <xsl:param name="index" />
- <xsl:param name="count" />
- <xsl:if test="$index < $count">
- <xsl:apply-templates select="dict[$index+1]" mode="pagelink" />
- <xsl:call-template name="PageLinksLoop">
- <xsl:with-param name="index" select="$index+1" />
- <xsl:with-param name="count" select="$count" />
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
-
- <xsl:template match="*" mode="Thumbnails">
- <table class="thumbnails" summary="thumbnails">
- <xsl:call-template name="ThumbnailRowLoop">
- <xsl:with-param name="startIndex" select="0" />
- <xsl:with-param name="count" select="count(dict)" />
- </xsl:call-template>
- </table>
- </xsl:template>
-
- <xsl:template name="ThumbnailRowLoop">
- <xsl:param name="startIndex" />
- <xsl:param name="count" />
- <xsl:if test="$startIndex < $count">
- <tr>
- <xsl:call-template name="ThumbnailColLoop">
- <xsl:with-param name="index" select="$startIndex" />
- <xsl:with-param name="finishIndex" select="$startIndex+5" />
- <xsl:with-param name="count" select="$count" />
- </xsl:call-template>
- </tr>
- <xsl:call-template name="ThumbnailRowLoop">
- <xsl:with-param name="startIndex" select="$startIndex+5" />
- <xsl:with-param name="count" select="$count" />
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
-
- <xsl:template name="ThumbnailColLoop">
- <xsl:param name="index" />
- <xsl:param name="finishIndex" />
- <xsl:param name="count" />
- <xsl:if test="$index < $finishIndex">
- <xsl:choose>
- <xsl:when test="$index < $count">
- <xsl:apply-templates select="dict[$index+1]" mode="thumbnail" />
- </xsl:when><xsl:otherwise>
- <xsl:call-template name="OutputEmptyCol" />
- </xsl:otherwise>
- </xsl:choose>
- <xsl:call-template name="ThumbnailColLoop">
- <xsl:with-param name="index" select="$index+1" />
- <xsl:with-param name="finishIndex" select="$finishIndex" />
- <xsl:with-param name="count" select="$count" />
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
-
- <xsl:template match="key">
- <xsl:value-of select="following-sibling::node()[1]" />
- </xsl:template>
- </xsl:stylesheet>
-