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">
- <xsl:variable name="CreateLink">
- <xsl:apply-templates select="key[text()='CreateLink']" />
- </xsl:variable>
- <xsl:variable name="FilePath">
- <xsl:apply-templates select="key[text()='FilePath']" />
- </xsl:variable>
- <xsl:variable name="ThumbnailPath">
- <xsl:apply-templates select="key[text()='ThumbnailPath']" />
- </xsl:variable>
- <xsl:variable name="ImagePath">
- <xsl:choose>
- <xsl:when test="$ThumbnailPath != ''">
- <xsl:value-of select="$ThumbnailPath" />
- </xsl:when><xsl:otherwise>
- <xsl:value-of select="$FilePath" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="MovieMessage">
- <xsl:apply-templates select="key[text()='MovieMessage']" />
- </xsl:variable>
- <xsl:variable name="MovieWarning">
- <xsl:apply-templates select="key[text()='MovieWarning']" />
- </xsl:variable>
-
- <!-- 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/imgicon.png" width="32" height="30" />
- <div class="header"><xsl:apply-templates select="key[text()='Title']" /></div>
- <div class="headerdate">
- <xsl:apply-templates select="key[text()='Date']" />
- <xsl:text> </xsl:text>
- <xsl:apply-templates select="key[text()='Time']" />
- </div>
- </td></tr>
- <tr><td class="layout">
- <xsl:call-template name="PageIndex" />
- <xsl:call-template name="Navigator" />
- </td></tr>
- <tr><td class="slide">
- <xsl:if test="$MovieMessage != ''">
- <div class="slidemsg"><xsl:value-of select="$MovieMessage" /></div>
- </xsl:if>
- <xsl:if test="$MovieWarning != ''">
- <div class="slidewarning"><xsl:value-of select="$MovieWarning" /></div>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="$CreateLink != ''">
- <xsl:element name="a"><xsl:attribute name="href"><xsl:value-of select="$FilePath" /></xsl:attribute>
- <xsl:element name="img">
- <xsl:attribute name="class">thumbnail</xsl:attribute>
- <xsl:attribute name="src"><xsl:value-of select="$ImagePath" /></xsl:attribute>
- <xsl:attribute name="alt"><xsl:value-of select="$FilePath" /></xsl:attribute>
- <xsl:attribute name="height"><xsl:apply-templates select="key[text()='SlideHeight']" /></xsl:attribute>
- <xsl:attribute name="width"><xsl:apply-templates select="key[text()='SlideWidth']" /></xsl:attribute>
- </xsl:element>
- </xsl:element>
- </xsl:when><xsl:otherwise>
- <xsl:element name="img">
- <xsl:attribute name="class">thumbnail</xsl:attribute>
- <xsl:attribute name="src"><xsl:value-of select="$ImagePath" /></xsl:attribute>
- <xsl:attribute name="alt"><xsl:value-of select="$FilePath" /></xsl:attribute>
- <xsl:attribute name="height"><xsl:apply-templates select="key[text()='SlideHeight']" /></xsl:attribute>
- <xsl:attribute name="width"><xsl:apply-templates select="key[text()='SlideWidth']" /></xsl:attribute>
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
- </td></tr>
- </table>
- </div>
- </body>
- </html>
- </xsl:template>
-
- <xsl:template name="Navigator">
- <xsl:variable name="IndexPage">
- <xsl:apply-templates select="key[text()='IndexPage']" />
- </xsl:variable>
- <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="$IndexPage != ''">
- <xsl:element name="a">
- <xsl:attribute name="href"><xsl:value-of select="$IndexPage"/></xsl:attribute>
- <img class="icon" src="../parts/back.png" width="28" height="16" />
- </xsl:element>
- </xsl:when><xsl:otherwise><img class="margin" src="../parts/space.png" width="28" height="16" /></xsl:otherwise>
- </xsl:choose>
- <img class="margin" src="../parts/space.png" width="16" height="16" />
- <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 name="PageIndex">
- <!-- PageIndex HTML -->
- <div class="pageindex">
- <xsl:apply-templates select="key[text()='ImageIndex']" />
- <xsl:text> / </xsl:text>
- <xsl:apply-templates select="key[text()='TotalImages']" />
- </div>
- </xsl:template>
-
-
- <xsl:template match="key">
- <xsl:value-of select="following-sibling::node()[1]" />
- </xsl:template>
- </xsl:stylesheet>
-