translation working
git-svn-id: svn://anubis/gvsu@132 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
parent
770a78ea7c
commit
2f4983b25e
@ -1,3 +1,3 @@
|
||||
|
||||
all:
|
||||
xsltproc test-sched.xml
|
||||
xsltproc test-sched.xml > test-sched.html
|
||||
|
@ -1,7 +1,45 @@
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output method="html" />
|
||||
<xsl:strip-space elements="*" />
|
||||
|
||||
<xsl:template match="/">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Daily Planner</title>
|
||||
<style type="text/css">
|
||||
.day, th { background-color: #FF8; }
|
||||
table, td, th { border: solid #000 1px; padding: 3px; }
|
||||
</style>
|
||||
</head><body>
|
||||
<table border="0" cellpadding="0" cellspacing="0"><caption>Daily Planner</caption>
|
||||
<tr><th> </th><th>AM</th><th>PM</th></tr>
|
||||
<xsl:apply-templates/>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="sunday|monday|tuesday|wednesday|thursday|friday|saturday">
|
||||
<tr>
|
||||
<td class="day">
|
||||
<xsl:variable name="day" select="local-name()"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$day='sunday'">Sunday</xsl:when>
|
||||
<xsl:when test="$day='monday'">Monday</xsl:when>
|
||||
<xsl:when test="$day='tuesday'">Tuesday</xsl:when>
|
||||
<xsl:when test="$day='wednesday'">Wednesday</xsl:when>
|
||||
<xsl:when test="$day='thursday'">Thursday</xsl:when>
|
||||
<xsl:when test="$day='friday'">Friday</xsl:when>
|
||||
<xsl:otherwise>Saturday</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<xsl:apply-templates/>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="am|pm">
|
||||
<td><xsl:value-of select="."/></td>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
Loading…
x
Reference in New Issue
Block a user