xslt files
authormail <mail@joachim-breitner.de>
Fri, 28 Sep 2007 19:04:54 +0000 (19:04 +0000)
committermail <mail@joachim-breitner.de>
Fri, 28 Sep 2007 19:04:54 +0000 (19:04 +0000)
xslt/libxslt/defaultStyle.xsl [new file with mode: 0644]
xslt/libxslt/defaultXML.xsl [new file with mode: 0644]
xslt/libxslt/forms.xsl [new file with mode: 0644]
xslt/libxslt/forms2.xsl [new file with mode: 0644]
xslt/libxslt/forms3.xsl [new file with mode: 0644]
xslt/libxslt/script.js [new file with mode: 0644]
xslt/libxslt/style.css [new file with mode: 0644]
xslt/libxslt/xslt2.dtd [new file with mode: 0644]
xslt/style.xsl [new file with mode: 0644]

diff --git a/xslt/libxslt/defaultStyle.xsl b/xslt/libxslt/defaultStyle.xsl
new file mode 100644 (file)
index 0000000..ec57c11
--- /dev/null
@@ -0,0 +1,119 @@
+<!DOCTYPE xsl:stylesheet PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xslt2.dtd">\r
+<xsl:stylesheet \r
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"\r
+ xmlns="http://www.w3.org/1999/xhtml"\r
+ >\r
+\r
+<!--\r
+have all the xml representing functions styled by a stylesheet that includes this one\r
+override parts for each one\r
+\r
+-->\r
+\r
+<xsl:include href="forms.xsl"/>\r
+\r
+<xsl:variable name="staticURL">/</xsl:variable>\r
+\r
+       <!--<xsl:with-param name="staticURL" select="$index/@staticURL"/>-->\r
+\r
+<xsl:template match="/">\r
+  <xsl:apply-templates select="/" mode="page"/>\r
+</xsl:template>\r
+\r
+\r
+<xsl:template match="*" mode="bodyAttrs">\r
+<!--<xsl:attribute name="onload">alert("foo")</xsl:attribute>-->\r
+</xsl:template>\r
+\r
+<xsl:template match="/*" mode="page">\r
+  <!--<xsl:param name="onload"/>-->\r
+  <html xmlns="http://www.w3.org/1999/xhtml">\r
+       <xsl:apply-templates select="." mode="head"/>\r
+       <!-- xonload="{$onload}" -->\r
+       <body><xsl:apply-templates select="." mode="bodyAttrs"/>\r
+         <div id="body">\r
+               <!--<xsl:value-of select="name(current())"/>-->\r
+               <div id="header">\r
+                 <xsl:apply-templates mode="header" select="."/>\r
+               </div>\r
+               <div id="content">\r
+                 <xsl:apply-templates mode="content" select="."/>\r
+               </div>\r
+               <div id="footer">\r
+                 <xsl:apply-templates mode="footer" select="."/>\r
+               </div>\r
+\r
+         </div>\r
+       </body>\r
+  </html>\r
+</xsl:template>\r
+\r
+<xsl:template match="*" mode="title">\r
+Default Title\r
+</xsl:template>\r
+\r
+<xsl:template match="*" mode="inHead">\r
+</xsl:template>\r
+\r
+<xsl:template match="*" mode="head_locals">\r
+</xsl:template>\r
+\r
+<xsl:template match="*" mode="head_globals">\r
+</xsl:template>\r
+\r
+<xsl:template match="*" mode="header">\r
+<h1>Your Page Head</h1>\r
+this is the page header.  use &lt;xsl:template match="*" mode="header"&gt; to override.\r
+<hr/>\r
+</xsl:template>\r
+<xsl:template match="*" mode="footer">\r
+<hr/>\r
+(c) HAppS.org 2007.  <br/>\r
+this is the page footer.  use &lt;xsl:template match="*" mode="footer"&gt; to override.\r
+\r
+</xsl:template>\r
+\r
+\r
+<xsl:template match="*" mode="head">\r
+  <head>\r
+    <title>\r
+       <xsl:apply-templates mode="title" select="." />\r
+  </title>\r
+  <xsl:apply-templates mode="head_globals" select="."/>\r
+  <xsl:apply-templates mode="head_locals" select="."/>\r
+       <xsl:apply-templates mode="inHead" select="." />\r
+  <!--\r
+  <link rel="stylesheet" href="{$staticURL}style.css" \r
+               type="text/css" media="all" />\r
+  \r
+  <script src="{$staticURL}script.js" type="text/javascript"/>\r
+  -->\r
+\r
+  <meta name="MSSmartTagsPreventParsing" content="TRUE" />\r
+  <!--<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />-->\r
+  <meta http-equiv="expires" content="-1" />\r
+  <meta http-equiv=" pragma" content="no-cache" />\r
+  <meta name="robots" content="all" />  \r
+  </head>\r
+</xsl:template>\r
+\r
+<xsl:template name="titleBlock">\r
+  <xsl:param name="siteName"/>\r
+  <xsl:param name="homeURL"/>\r
+  <xsl:param name="tagLine"/>\r
+  <div id="titleBlock">\r
+       <div id="siteName">  <a href="{$homeURL}"><xsl:value-of select="$siteName"/></a>        </div>\r
+       <h3 id="tagLine"><xsl:value-of select="$tagLine"/></h3>\r
+  </div>\r
+\r
+</xsl:template>\r
+\r
+\r
+<xsl:include href="defaultXML.xsl"/>\r
+<xsl:template match="*" mode="content">\r
+  <xsl:apply-templates select="/" mode="xml"/>\r
+</xsl:template>\r
+\r
+<xsl:include href="forms2.xsl"/>\r
+\r
+</xsl:stylesheet>\r
diff --git a/xslt/libxslt/defaultXML.xsl b/xslt/libxslt/defaultXML.xsl
new file mode 100644 (file)
index 0000000..f89f860
--- /dev/null
@@ -0,0 +1,73 @@
+<!DOCTYPE xsl:stylesheet PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xslt2.dtd">\r
+<xsl:stylesheet\r
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \r
+  xmlns="http://www.w3.org/1999/xhtml"\r
+  version="1.0">\r
+\r
+<!--\r
+<xsl:output method="html" omit-xml-declaration="yes" \r
+                       doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" \r
+                       doctype-system="http://www.w3.org/TR/html4/loose.dtd" \r
+                       encoding="ISO-8859-1"/>\r
+-->\r
+\r
+<xsl:strip-space\r
+  elements = "*" />\r
+<xsl:template name="root" mode="xml" match="/">\r
+  <!--<html xmlns="http://www.w3.org/1999/xhtml">\r
+       <body>\r
+         this is the top\r
+first: <xsl:value-of select="name(./*[1])"/>-->\r
+         <hr/>\r
+         <xsl:apply-templates mode="xml" select="*"/>\r
+         <hr/>\r
+<!--     this is the end\r
+       </body>\r
+  </html>-->\r
+</xsl:template>\r
+\r
+\r
+<xsl:template mode="xml" match="html">\r
+  <xsl:copy-of select="."/>\r
+</xsl:template>\r
+<xsl:template name="node" mode="xml" match="*">\r
+\r
+  &lt;<xsl:value-of select="name(current())"/>\r
+  &nbsp;  \r
+  <xsl:apply-templates mode="xml" select="@*"/>\r
+\r
+  <xsl:choose>\r
+       <xsl:when test="count(*|text())>0">\r
+         &gt;\r
+         <ul>  <xsl:apply-templates mode="xml" select="*|text()"/>  </ul>\r
+         &lt;/<xsl:value-of select="name(current())"/>&gt;<br/>\r
+       </xsl:when>\r
+       <xsl:otherwise>\r
+         &nbsp;\r
+         /&gt;<br/>\r
+       </xsl:otherwise>\r
+  </xsl:choose>\r
+\r
+  \r
+</xsl:template>\r
+\r
+\r
+<xsl:template name="text" mode="xml" match="text()">\r
+  <xsl:value-of select="."/>\r
+   <br/>\r
+\r
+</xsl:template>\r
+\r
+\r
+<!--[name(current())!='']-->\r
+<xsl:template name="attr" mode="xml" match="@*">\r
+       <!--<br/>&nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;  &nbsp;  -->\r
+       &nbsp;\r
+       <xsl:value-of select="name(current())"/>=&quot;<a href="{current()}"><xsl:value-of select="current()"/>&quot;\r
+       \r
+       </a>\r
+\r
+</xsl:template>\r
+\r
+\r
+</xsl:stylesheet>\r
diff --git a/xslt/libxslt/forms.xsl b/xslt/libxslt/forms.xsl
new file mode 100644 (file)
index 0000000..ecd53fc
--- /dev/null
@@ -0,0 +1,123 @@
+<!DOCTYPE xsl:stylesheet PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xslt2.dtd">\r
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">\r
+\r
+\r
+<!--generic forms implementation -->\r
+\r
+\r
+<xsl:template match="form" mode="xml">\r
+  <form id="{@id}"  action="{@action}" method="{@method}">\r
+       <xsl:apply-templates select="*" mode="form"/>\r
+  </form>\r
+</xsl:template>\r
+\r
+\r
+<xsl:attribute-set name="form">\r
+  <xsl:attribute name="action"><xsl:value-of select="@action"/></xsl:attribute>\r
+  <xsl:attribute name="method"><xsl:value-of select="@method"/></xsl:attribute>\r
+  <xsl:attribute name="onsubmit">return verify(this)</xsl:attribute>\r
+</xsl:attribute-set>\r
+\r
+<xsl:template match="*" mode="input">\r
+<xsl:param name="label"/>\r
+<xsl:param name="cols">50</xsl:param>\r
+<xsl:param name="size"/>\r
+<xsl:param name="id"/>\r
+\r
+<xsl:variable name="name" select="substring(concat(name(),@name), (string-length(name())+1)* round(string-length(@name) div (string-length(@name)+1)) )"/>\r
+<xsl:variable name="id_" select="substring(concat($name,$id), (string-length($name)+1)* round(string-length($id) div (string-length($id)+1)) )"/>\r
+<xsl:variable name="size_" select="substring(concat(@maxlength,$size), (string-length(@maxlength)+1)* round(string-length($size) div (string-length($size)+1)) )"/>\r
+\r
+<label xstyle="vertical-align: top" for="{$id_}"><xsl:copy-of select="$label"/>:&nbsp;&nbsp;</label>\r
+\r
+<xsl:choose>\r
+<xsl:when test="@type='bool'">\r
+<input type="radio" required="{@required}" name="{$name}" value="1"/> Yes\r
+<input type="radio" required="{@required}" name="{$name}" value="0"/> No\r
+</xsl:when>\r
+\r
+<xsl:when test="@type='page'">\r
+<!--<label for="{$name}"><xsl:value-of select="$label"/>: <br/></label>-->\r
+<br/>\r
+<textarea cols="{$cols}" rows="20" name="{$name}">\r
+<xsl:copy-of select="./text()"/>\r
+</textarea>\r
+</xsl:when>\r
+\r
+\r
+<xsl:when test="@type='para'">\r
+<!--<label for="{$name}"><xsl:value-of select="$label"/>: <br/></label>-->\r
+<br/>\r
+<textarea cols="{$cols}" rows="6" name="{$name}">\r
+<xsl:copy-of select="./text()"/>\r
+</textarea>\r
+</xsl:when>\r
+\r
+\r
+<xsl:when test="@type='sentence'">\r
+<br/>\r
+<textarea cols="{$cols}" rows="3" name="{$name}">\r
+<xsl:copy-of select="./text()"/>\r
+</textarea>\r
+</xsl:when>\r
+\r
+\r
+<xsl:otherwise>\r
+<input name="{$name}" id="{$id_}" required="{@required}" size="{$size_}" maxlength="{@maxlength}" value="{text()}"/>\r
+</xsl:otherwise>\r
+</xsl:choose>\r
+\r
+\r
+</xsl:template>\r
+\r
+<xsl:template match="*" mode="textarea">\r
+<xsl:param name="label"/>\r
+<xsl:param name="id"/>\r
+\r
+<xsl:variable name="hasNameAttr" select="round(string-length(@name) div (string-length(@name)+1))"/>\r
+<xsl:variable name="offset" select="$hasNameAttr*(string-length(name())+1)"/>\r
+<xsl:variable name="name" select="substring(concat(name(),@name),$offset)"/>\r
+\r
+<label for="{$name}"><xsl:value-of select="$label"/>: <br/></label>\r
+<textarea cols="{@cols}" rows="{@rows}" name="{$name}">\r
+<xsl:value-of select="text()"/>\r
+</textarea>\r
+\r
+</xsl:template>\r
+\r
+<xsl:template match="*" mode="yes-no">\r
+<xsl:param name="label"/>\r
+<xsl:param name="id"/>\r
+<xsl:variable name="name" select="substring(concat(name(),@name), (string-length(name())+1)* round(string-length(@name) div (string-length(@name)+1)) )"/>\r
+<xsl:variable name="id_" select="substring(concat($name,$id), (string-length($name)+1)* round(string-length($id) div (string-length($id)+1)) )"/>\r
+\r
+<label for="{$id_}"><xsl:value-of select="$label"/>: </label>\r
+\r
+</xsl:template>\r
+\r
+<!--\r
+\r
+<xsl:element name="script">\r
+<xsl:attribute name="language">javascript</xsl:attribute>\r
+<xsl:attribute name="type">text/javascript</xsl:attribute>\r
+//!-<script language="javascript" type="text/javascript">-\r
+//   alert("")\r
+<![CDATA[\r
+//   alert("h2")\r
+]]>\r
+\r
+//-</script>\r
+</xsl:element>\r
+  <xsl:value-of select="$index/@regURL"/>\r
+\r
+Types:\r
+input\r
+select\r
+check\r
+how to handle multilevel select?\r
+-->\r
+\r
+\r
+\r
+</xsl:stylesheet>\r
+\r
diff --git a/xslt/libxslt/forms2.xsl b/xslt/libxslt/forms2.xsl
new file mode 100644 (file)
index 0000000..8eabfac
--- /dev/null
@@ -0,0 +1,217 @@
+<!DOCTYPE xsl:stylesheet PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xslt2.dtd">\r
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">\r
+\r
+\r
+<!--generic forms implementation -->\r
+<xsl:variable name="locale">en-us</xsl:variable>\r
+<xsl:variable name="formDict">\r
+<locale>\r
+  <div name="account">\r
+        <attr name="userName">\r
+          <en-us>Name</en-us>\r
+        </attr>\r
+  </div>\r
+  <form name="login">\r
+        <!--login-->\r
+        <field name="email">\r
+          <en-us><n>Email</n></en-us>\r
+        </field>\r
+        <field name="password">\r
+          <en-us><n>Password</n></en-us>\r
+               </field>\r
+        <field name="login">\r
+          <en-us><n>Login</n></en-us>\r
+        </field>\r
+  </form>\r
+</locale>\r
+</xsl:variable>\r
+\r
+<xsl:template match="form" >\r
+  <form id="{@id}"  action="{@action}" method="{@method}" >\r
+       <xsl:apply-templates select="*" />\r
+  </form>\r
+</xsl:template>\r
+\r
+\r
+<xsl:template match="field[@type='Submit']"  >\r
+  <div class="row">\r
+       <span class="formLabel"/>\r
+       <span class="formEl">\r
+         <xsl:variable name="form" select="ancestor::form/@name"/>\r
+         <xsl:variable name="name" select="@name"/>\r
+         <xsl:variable name="info" \r
+                                       select="$formDict/locale/form[@name=$form]/field[@name=$name]/*[name()=$locale]"/>\r
+         <xsl:variable name="value">\r
+               <xsl:choose>\r
+                 <xsl:when test="count($info)=0"><xsl:value-of select="@name"/></xsl:when>\r
+                 <xsl:otherwise><xsl:value-of select="$info/n/text()"/></xsl:otherwise>\r
+               </xsl:choose>\r
+         </xsl:variable>\r
+         <input type="submit" name="{@name}" id="{ancestor::form/@id}{@name}" \r
+                        value="{$value}" />\r
+<!--$info/n/text()-->\r
+       </span>\r
+  </div>\r
+</xsl:template>\r
+\r
+\r
+\r
+<xsl:template match="field" >\r
+  <xsl:apply-templates select="." mode="fieldBefore"/>\r
+  <xsl:variable name="name" select="@name"/>\r
+  <xsl:variable name="form" select="ancestor::form/@name"/>\r
+  <xsl:variable name="info" \r
+                               select="$formDict/locale/form[@name=$form]/field[@name=$name]/*[name()=$locale]"/>\r
+  <!--select="$formDict/locale/*[name()=$name]/*[name()=$locale]"/>-->\r
+  <div class="row">\r
+       <span class="formLabel">\r
+         <xsl:choose>\r
+               <xsl:when test="count($info/*)!=0">\r
+                 <xsl:copy-of select="$info/n/*|$info/n/text()"/>\r
+               </xsl:when>\r
+               <xsl:otherwise>\r
+                 <xsl:value-of select="@name"/>\r
+               </xsl:otherwise>\r
+         </xsl:choose>\r
+       </span>\r
+       <span class="formEl">\r
+         <xsl:apply-templates select="." mode="formEl">\r
+               <xsl:with-param name="info" select="$info"/>\r
+         </xsl:apply-templates>\r
+       </span>\r
+       <span class="instructEl">\r
+         <xsl:choose>\r
+               <xsl:when test="$info/note!=''">\r
+                 (<xsl:copy-of select="$info/note"/>)\r
+               </xsl:when>\r
+               <xsl:when test="count($info/*)=0">\r
+                 (<xsl:value-of select="@type"/>\r
+                 <xsl:apply-templates select="option" mode="instruct"/>\r
+                 )\r
+               </xsl:when>\r
+               <xsl:otherwise/>\r
+         </xsl:choose>\r
+       </span>\r
+  </div>\r
+  <xsl:apply-templates select="." mode="fieldAfter"/>\r
+</xsl:template>\r
+\r
+<xsl:template match="option" mode="instruct">\r
+  [<xsl:value-of select="@value"/>]\r
+</xsl:template>\r
+\r
+<xsl:template match="field" mode="formEl" >\r
+  <xsl:param name="info"/>\r
+  <input type="text" name="{@name}" id="{ancestor::form/@id}{@name}" \r
+                value="{@value}"/>\r
+</xsl:template>\r
+\r
+\r
+<xsl:template match="field[@type='Name']" mode="formEl" >\r
+  <xsl:param name="info"/>\r
+  <input type="text" name="{@name}" id="{ancestor::form/@id}{@name}" \r
+                value="{@value}"/>\r
+</xsl:template>\r
+\r
+<xsl:template match="field[@type='Phrase']" mode="formEl" >\r
+  <xsl:param name="info"/>\r
+  <input type="text" name="{@name}" id="{ancestor::form/@id}{@name}" \r
+                value="{@value}"/>\r
+</xsl:template>\r
+\r
+<xsl:template match="field[@type='Word']" mode="formEl" >\r
+  <xsl:param name="info"/>\r
+  <input type="text" name="{@name}" id="{ancestor::form/@id}{@name}" \r
+                value="{@value}" size="10"/>\r
+</xsl:template>\r
+\r
+<!--\r
+<xsl:template match="field[@type='Select']" mode="formEl">\r
+  <xsl:param name="info"/>\r
+  <xsl:choose>\r
+       <xsl:when test="count(option)&lt;4">\r
+         <xsl:apply-templates select="option" mode="formElRadio"/>\r
+       </xsl:when>\r
+       <xsl:when test="count($info/option)&lt;4">\r
+         <xsl:apply-templates select="option" mode="formElRadio"/>\r
+       </xsl:when>\r
+       <xsl:otherwise>\r
+       </xsl:otherwise>\r
+  </xsl:choose>\r
+</xsl:template>\r
+-->\r
+<xsl:template match="field[@type='Bool']" mode="formEl">\r
+  <xsl:param name="info"/>\r
+  <xsl:variable name="opt1Info">\r
+       <xsl:copy-of select="$info/option[1]/*|$info/option[1]/text()"/>\r
+  </xsl:variable>\r
+  <label><xsl:value-of select="$opt1Info"/>\r
+       <input type="radio" name="{@name}" id="{ancestor::form/@id}{@name}_1" \r
+                value="{$info/option[1]/@value}" />\r
+  </label>\r
+  <label><xsl:copy-of select="$info/option[2]/*|$info/option[2]/text()"/>\r
+       <input type="radio" name="{@name}" id="{ancestor::form/@id}{@name}_2" \r
+                value="{$info/option[2]/@value}" />\r
+  </label>\r
+</xsl:template>\r
+\r
+\r
+<xsl:template match="field[@type='Email']" mode="formEl">\r
+  <input type="text" name="{@name}" id="{ancestor::form/@id}{@name}" \r
+                value="{@value}" size="30"/>\r
+  <!--\r
+       add javascript here later to validate email format!\r
+       need interface for javascript events?\r
+       or just put javascript inline that associates actions?\r
+  -->\r
+</xsl:template>\r
+\r
+<xsl:template match="field[@type='Password']" mode="formEl">\r
+  <input type="password" name="{@name}" id="{ancestor::form/@id}{@name}" \r
+                value="{@value}" size="10"/>\r
+</xsl:template>\r
+\r
+<xsl:template match="field[@type='URL']" mode="formEl">\r
+  <input type="text" name="{@name}" \r
+                id="{ancestor::form/@id}{@name}" \r
+                value="{@value}" size="30"/>\r
+</xsl:template>\r
+\r
+<xsl:template match="field[@type='Date']" mode="formEl">\r
+  <input type="text" name="{@name}" \r
+                id="{ancestor::form/@id}{@name}" \r
+                value="{@value}" size="10" maxlength="10"/>\r
+</xsl:template>\r
+\r
+<xsl:template match="field[@type='Country']" mode="formEl">\r
+  <xsl:param name="info"/>\r
+  <select name="{@name}" id="{ancestor::form/@id}{@name}">\r
+       <xsl:copy-of select="$info/option"/>\r
+  </select>\r
+</xsl:template>\r
+\r
+\r
+<xsl:template match="@*" name="info">\r
+  <xsl:variable name="div" select="ancestor::div/@name"/>\r
+  <xsl:variable name="name" select="name()"/>\r
+  <xsl:variable name="label" \r
+                               select="$formDict/locale/div[@name=$div]/attr[@name=$name]/*[name()=$locale]"/>\r
+  <div  class="row">\r
+       <span style="font-weight:bold;" class="formLabel">\r
+         <xsl:choose>\r
+               <xsl:when test="not($label)">\r
+                 <xsl:value-of select="name()"/>\r
+               </xsl:when>\r
+               <xsl:otherwise>\r
+                 <xsl:copy-of select="$label"/>\r
+               </xsl:otherwise>\r
+         </xsl:choose>\r
+       </span>\r
+       <span class="formEl"><xsl:value-of select="."/>\r
+       </span>\r
+  </div>  \r
+</xsl:template>\r
+\r
+\r
+\r
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/xslt/libxslt/forms3.xsl b/xslt/libxslt/forms3.xsl
new file mode 100644 (file)
index 0000000..d3ce8d6
--- /dev/null
@@ -0,0 +1,56 @@
+<!DOCTYPE xsl:stylesheet PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xslt2.dtd">\r
+<xsl:stylesheet \r
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"\r
+ xmlns:html='http://www.w3.org/TR/REC-html40'\r
+ >\r
+  \r
+<xsl:template match="html:form" >\r
+  <form id="{@id}"  action="{@action}" method="{@method}" >\r
+       <xsl:apply-templates select="*" />\r
+  </form>\r
+</xsl:template>\r
+\r
+<xsl:template match="input" >\r
+  <xsl:apply-templates select="." mode="inputBefore"/>\r
+  <xsl:variable name="name" select="@name"/>\r
+  <xsl:variable name="form" select="ancestor::form/@name"/>\r
+  <xsl:variable name="info" \r
+                               select="$formDict/locale/form[@name=$form]/field[@name=$name]/*[name()=$locale]"/>\r
+  <!--select="$formDict/locale/*[name()=$name]/*[name()=$locale]"/>-->\r
+  <div class="row">\r
+       <span class="formLabel">\r
+         <xsl:choose>\r
+               <xsl:when test="count($info/*)!=0">\r
+                 <xsl:copy-of select="$info/n/*|$info/n/text()"/>\r
+               </xsl:when>\r
+               <xsl:otherwise>\r
+                 <xsl:value-of select="@name"/>\r
+               </xsl:otherwise>\r
+         </xsl:choose>\r
+       </span>\r
+       <span class="formEl">\r
+         <xsl:apply-templates select="." mode="formEl">\r
+               <xsl:with-param name="info" select="$info"/>\r
+         </xsl:apply-templates>\r
+       </span>\r
+       <span class="instructEl">\r
+         <xsl:choose>\r
+               <xsl:when test="$info/note!=''">\r
+                 (<xsl:copy-of select="$info/note"/>)\r
+               </xsl:when>\r
+               <xsl:when test="count($info/*)=0">\r
+                 (<xsl:value-of select="@type"/>\r
+                 <xsl:apply-templates select="option" mode="instruct"/>\r
+                 )\r
+               </xsl:when>\r
+               <xsl:otherwise/>\r
+         </xsl:choose>\r
+       </span>\r
+  </div>\r
+  <xsl:apply-templates select="." mode="fieldAfter"/>\r
+</xsl:template>\r
+\r
+\r
+\r
+\r
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/xslt/libxslt/script.js b/xslt/libxslt/script.js
new file mode 100644 (file)
index 0000000..c3f0a28
--- /dev/null
@@ -0,0 +1,173 @@
+//if(frames){if(top.frames.length>0)\r
+//top.location.href=self.location;}\r
+\r
+function visi(nr)\r
+{\r
+       if (document.getElementById)\r
+       {\r
+           startVal=document.getElementById(nr).style.visibility\r
+               vista = (startVal == 'hidden' || startVal=='') ? 'visible' : 'hidden';\r
+               //el=document.getElementById(nr).style\r
+               document.getElementById(nr).style.visibility = vista;\r
+               alert(startVal+" "+nr)\r
+\r
+       }\r
+       else if (document.layers)\r
+       {\r
+           el=document.layers[nr]\r
+               vista = (document.layers[nr].visibility == 'hide') ? 'show' : 'hide'\r
+               document.layers[nr].visibility = vista;\r
+       }\r
+       else if (document.all)\r
+       {\r
+           el=document.all[nr].style\r
+               vista = (document.all[nr].style.visibility == 'hidden') ? 'visible'     : 'hidden';\r
+               document.all[nr].style.visibility = vista;\r
+       }\r
+\r
+       //el.display=el.display=='none'?'block':'none';\r
+}\r
+\r
+function getStyle(nr) {\r
+       return (document.layers?document.layers[nr]:document.all?document.all[nr].style:document.getElementById(nr).style);\r
+}\r
+\r
+function setBlocking(nr,b){\r
+       style=getStyle(nr);\r
+       //      style=document.layers?document.layers[nr]:document.all?document.all[nr].style:document.getElementById(nr).style;\r
+       style.display=b?'block':'none';\r
+       //alert(nr+" "+b+" "+style.display);\r
+\r
+}\r
+function blocking(nr)\r
+{\r
+       style=document.layers?document.layers[nr]:document.all?document.all[nr].style:document.getElementById(nr).style;\r
+\r
+       if (style.display!='none' && style.display!='block') \r
+       { style.display='none';}\r
+       if (style.display=='none') {style.display='block';      }\r
+       else {style.display='none';}\r
+\r
+       return;\r
+\r
+\r
+       if (document.layers)\r
+       {\r
+               current = (document.layers[nr].display == 'none') ? 'block' : 'none';\r
+               document.layers[nr].display = current;\r
+       }\r
+       else if (document.all)\r
+       {\r
+               current = (document.all[nr].style.display == 'none') ? 'block' : 'none';\r
+               document.all[nr].style.display = current;\r
+       }\r
+       else if (document.getElementById)\r
+       {\r
+               current = (document.getElementById(nr).style.display == 'none') ? 'block' : 'none';\r
+               document.getElementById(nr).style.display = current;\r
+       }\r
+}\r
+\r
+function getStyle(nr)\r
+{\r
+   if (document.getElementById) {return document.getElementById(nr).style}\r
+   if (document.all) {return document.all[nr].style;}\r
+   if (document.layers) {return document.layers[nr];}\r
+\r
+\r
+}\r
+function blockingOld(nr) { \r
+   style=getStyle(nr)\r
+   current=style.display\r
+   getStyle(nr).display=(current=='none')?'block':'none';\r
+}\r
+\r
+\r
+//-->\r
+\r
+//--cookie stuff\r
+var expDays = 1; // number of days the cookie should last\r
+\r
+var page = "only-popup-once.html";\r
+var windowprops = "width=300,height=200,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=yes";\r
+\r
+function GetCookie (name) {  \r
+var arg = name + "=";  \r
+var alen = arg.length;  \r
+var clen = document.cookie.length;  \r
+var i = 0;  \r
+while (i < clen) {    \r
+var j = i + alen;    \r
+if (document.cookie.substring(i, j) == arg)      \r
+return getCookieVal (j);    \r
+i = document.cookie.indexOf(" ", i) + 1;    \r
+if (i == 0) break;   \r
+}  \r
+return null;\r
+}\r
+function SetCookie (name, value) {  \r
+var argv = SetCookie.arguments;  \r
+var argc = SetCookie.arguments.length;  \r
+var expires = (argc > 2) ? argv[2] : null;  \r
+var path = (argc > 3) ? argv[3] : null;  \r
+var domain = (argc > 4) ? argv[4] : null;  \r
+var secure = (argc > 5) ? argv[5] : false;  \r
+document.cookie = name + "=" + escape (value) + \r
+((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + \r
+((path == null) ? "" : ("; path=" + path)) +  \r
+((domain == null) ? "" : ("; domain=" + domain)) +    \r
+((secure == true) ? "; secure" : "");\r
+}\r
+function DeleteCookie (name) {  \r
+var exp = new Date();  \r
+exp.setTime (exp.getTime() - 1);  \r
+var cval = GetCookie (name);  \r
+document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();\r
+}\r
+var exp = new Date(); \r
+exp.setTime(exp.getTime() + (expDays*24*60*60*1000));\r
+function amt(){\r
+var count = GetCookie('count')\r
+if(count == null) {\r
+SetCookie('count','1')\r
+return 1\r
+}\r
+else {\r
+var newcount = parseInt(count) + 1;\r
+DeleteCookie('count')\r
+SetCookie('count',newcount,exp)\r
+return count\r
+   }\r
+}\r
+function getCookieVal(offset) {\r
+var endstr = document.cookie.indexOf (";", offset);\r
+if (endstr == -1)\r
+endstr = document.cookie.length;\r
+return unescape(document.cookie.substring(offset, endstr));\r
+}\r
+\r
+function checkCount() {\r
+var count = GetCookie('count');\r
+if (count == null) {\r
+count=1;\r
+SetCookie('count', count, exp);\r
+\r
+window.open(page, "", windowprops);\r
+\r
+}\r
+else {\r
+count++;\r
+SetCookie('count', count, exp);\r
+   }\r
+}\r
+\r
+\r
+//  End -->\r
+\r
+\r
+function toggleAdvancedConfig()\r
+{\r
+       visi('advancedConfig');\r
+}\r
+\r
+\r
diff --git a/xslt/libxslt/style.css b/xslt/libxslt/style.css
new file mode 100644 (file)
index 0000000..a50fb7c
--- /dev/null
@@ -0,0 +1,108 @@
+html{\r
+       background-color:#eeF;\r
+}\r
+\r
+body{\r
+       text-align:center;\r
+       font-family:none;\r
+       width:100%;\r
+       padding: 0px;\r
+       margin:0px;\r
+       }\r
+\r
+#body{\r
+       margin:0px auto;\r
+       text-align:left;\r
+       width:750px;\r
+       }\r
+\r
+#footer {\r
+       margin-top:50px;\r
+       border-top:2px solid black;\r
+       font-weight: bold;\r
+       font-size:10px;\r
+       }\r
+\r
+#header select {\r
+       font-size:10px;\r
+}\r
+\r
+\r
+#titleBlock {\r
+       margin-bottom:50px;\r
+       xborder-bottom:2px solid black;\r
+       display:block;\r
+}\r
+\r
+#siteName {\r
+       font-face: Arial;\r
+       font-style: italic;\r
+       font-size:36px;\r
+       font-weight: bold;\r
+\r
+       margin-bottom:0px;\r
+       padding-bottom:0px;\r
+}\r
+#tagLine {\r
+       padding-top:0px;\r
+       margin-top:0px;\r
+       xfont-size:40px;\r
+}\r
+\r
+\r
+.pipemenu {\r
+       margin-left: 0;\r
+       padding-left: 0;\r
+       } \r
+\r
+.pipemenu li {\r
+       margin-left: 0;\r
+       padding: 3px 15px;\r
+       border-left: 1px solid #000;\r
+       list-style: none;\r
+       display: inline;\r
+       }\r
+       \r
+.pipemenu li.first {\r
+       border-left: none;\r
+       }\r
+\r
+\r
+\r
+th {\r
+ border-bottom:2px solid black;\r
+}\r
+\r
+.row .actions {padding:0px;margin:0px;}\r
+.row .actions li {padding:3px 5px;}\r
+\r
+\r
+.row {\r
+  clear: both;\r
+  padding-top: 10px;\r
+  margin-bottom: 10px;\r
+  font-size:12px;\r
+  }\r
+\r
+tr.row {font-size:13px;}\r
+.formSpace .row {vertical-align: text-top;}\r
+\r
+div.row .formLabel {\r
+       padding-left:20px;\r
+  }\r
+\r
+div.row .formEl {\r
+  text-align: left;\r
+  padding-left:20px;\r
+  }\r
+\r
+\r
+dt {font-weight: bold;padding-top:15px;}\r
+\r
+.instructEl {\r
+       border:0px;\r
+       padding: 0px;\r
+       \r
+       margin-left:10px;\r
+       }\r
+\r
diff --git a/xslt/libxslt/xslt2.dtd b/xslt/libxslt/xslt2.dtd
new file mode 100644 (file)
index 0000000..c6ebb4a
--- /dev/null
@@ -0,0 +1,188 @@
+<!-- C0 Controls and Basic Latin -->\r
+<!ENTITY quot    "&#34;"> <!--  quotation mark, U+0022 ISOnum -->\r
+<!ENTITY amp     "&#38;#38;"> <!--  ampersand, U+0026 ISOnum -->\r
+<!ENTITY lt      "&#38;#60;"> <!--  less-than sign, U+003C ISOnum -->\r
+<!ENTITY gt      "&#62;"> <!--  greater-than sign, U+003E ISOnum -->\r
+<!ENTITY apos   "&#39;"> <!--  apostrophe = APL quote, U+0027 ISOnum -->\r
+\r
+<!ENTITY nbsp   "&#160;"> \r
+\r
+<!-- General Punctuation -->\r
+<!ENTITY ensp    "&#8194;"> <!-- en space, U+2002 ISOpub -->\r
+<!ENTITY emsp    "&#8195;"> <!-- em space, U+2003 ISOpub -->\r
+<!ENTITY thinsp  "&#8201;"> <!-- thin space, U+2009 ISOpub -->\r
+<!ENTITY zwnj    "&#8204;"> <!-- zero width non-joiner,\r
+                                    U+200C NEW RFC 2070 -->\r
+<!ENTITY zwj     "&#8205;"> <!-- zero width joiner, U+200D NEW RFC 2070 -->\r
+<!ENTITY lrm     "&#8206;"> <!-- left-to-right mark, U+200E NEW RFC 2070 -->\r
+<!ENTITY rlm     "&#8207;"> <!-- right-to-left mark, U+200F NEW RFC 2070 -->\r
+<!ENTITY ndash   "&#8211;"> <!-- en dash, U+2013 ISOpub -->\r
+<!ENTITY mdash   "&#8212;"> <!-- em dash, U+2014 ISOpub -->\r
+<!ENTITY lsquo   "&#8216;"> <!-- left single quotation mark,\r
+                                    U+2018 ISOnum -->\r
+<!ENTITY rsquo   "&#8217;"> <!-- right single quotation mark,\r
+                                    U+2019 ISOnum -->\r
+<!ENTITY sbquo   "&#8218;"> <!-- single low-9 quotation mark, U+201A NEW -->\r
+<!ENTITY ldquo   "&#8220;"> <!-- left double quotation mark,\r
+                                    U+201C ISOnum -->\r
+<!ENTITY rdquo   "&#8221;"> <!-- right double quotation mark,\r
+                                    U+201D ISOnum -->\r
+<!ENTITY bdquo   "&#8222;"> <!-- double low-9 quotation mark, U+201E NEW -->\r
+<!ENTITY dagger  "&#8224;"> <!-- dagger, U+2020 ISOpub -->\r
+<!ENTITY Dagger  "&#8225;"> <!-- double dagger, U+2021 ISOpub -->\r
+<!ENTITY permil  "&#8240;"> <!-- per mille sign, U+2030 ISOtech -->\r
+<!ENTITY lsaquo  "&#8249;"> <!-- single left-pointing angle quotation mark,\r
+                                    U+2039 ISO proposed -->\r
+<!-- lsaquo is proposed but not yet ISO standardized -->\r
+<!ENTITY rsaquo  "&#8250;"> <!-- single right-pointing angle quotation mark,\r
+                                    U+203A ISO proposed -->\r
+<!-- rsaquo is proposed but not yet ISO standardized -->\r
+\r
+<!-- Currency Symbols -->\r
+<!ENTITY euro   "&#8364;"> <!--  euro sign, U+20AC NEW -->\r
+\r
+\r
+\r
+<!ENTITY iexcl  "&#161;"> <!-- inverted exclamation mark, U+00A1 ISOnum -->\r
+<!ENTITY cent   "&#162;"> <!-- cent sign, U+00A2 ISOnum -->\r
+<!ENTITY pound  "&#163;"> <!-- pound sign, U+00A3 ISOnum -->\r
+<!ENTITY curren "&#164;"> <!-- currency sign, U+00A4 ISOnum -->\r
+<!ENTITY yen    "&#165;"> <!-- yen sign = yuan sign, U+00A5 ISOnum -->\r
+<!ENTITY brvbar "&#166;"> <!-- broken bar = broken vertical bar,\r
+                                  U+00A6 ISOnum -->\r
+<!ENTITY sect   "&#167;"> <!-- section sign, U+00A7 ISOnum -->\r
+<!ENTITY copy   "&#169;"> <!-- copyright sign, U+00A9 ISOnum -->\r
+<!ENTITY ordf   "&#170;"> <!-- feminine ordinal indicator, U+00AA ISOnum -->\r
+<!ENTITY ldquo "&#x201C;" ><!-- "&_#x201C;" =double quotation mark, left-->\r
+<!ENTITY rdquo "&#x201D;" ><!-- "&_#x201D;" =double quotation mark, right-->\r
+<!ENTITY reg    "&#174;"> <!-- registered sign = registered trade mark sign,\r
+                                  U+00AE ISOnum -->\r
+<!ENTITY deg    "&#176;"> <!-- degree sign, U+00B0 ISOnum -->\r
+<!ENTITY sup2   "&#178;"> <!-- superscript two = superscript digit two\r
+                                  = squared, U+00B2 ISOnum -->\r
+<!ENTITY sup3   "&#179;"> <!-- superscript three = superscript digit three\r
+                                  = cubed, U+00B3 ISOnum -->\r
+<!ENTITY micro  "&#181;"> <!-- micro sign, U+00B5 ISOnum -->\r
+<!ENTITY middot "&#183;"> <!-- middle dot = Georgian comma\r
+                                  = Greek middle dot, U+00B7 ISOnum -->\r
+<!ENTITY ordm   "&#186;"> <!-- masculine ordinal indicator,\r
+                                  U+00BA ISOnum -->\r
+<!ENTITY frac14 "&#188;"> <!-- vulgar fraction one quarter\r
+                                  = fraction one quarter, U+00BC ISOnum -->\r
+<!ENTITY frac12 "&#189;"> <!-- vulgar fraction one half\r
+                                  = fraction one half, U+00BD ISOnum -->\r
+<!ENTITY frac34 "&#190;"> <!-- vulgar fraction three quarters\r
+                                  = fraction three quarters, U+00BE ISOnum -->\r
+<!ENTITY iquest "&#191;"> <!-- inverted question mark\r
+                                  = turned question mark, U+00BF ISOnum -->\r
+\r
+\r
+<!-- Greek -->\r
+<!ENTITY Alpha    "&#913;"> <!-- greek capital letter alpha, U+0391 -->\r
+<!ENTITY Beta     "&#914;"> <!-- greek capital letter beta, U+0392 -->\r
+<!ENTITY Gamma    "&#915;"> <!-- greek capital letter gamma,\r
+                                    U+0393 ISOgrk3 -->\r
+<!ENTITY Delta    "&#916;"> <!-- greek capital letter delta,\r
+                                    U+0394 ISOgrk3 -->\r
+<!ENTITY Epsilon  "&#917;"> <!-- greek capital letter epsilon, U+0395 -->\r
+<!ENTITY Zeta     "&#918;"> <!-- greek capital letter zeta, U+0396 -->\r
+<!ENTITY Eta      "&#919;"> <!-- greek capital letter eta, U+0397 -->\r
+<!ENTITY Theta    "&#920;"> <!-- greek capital letter theta,\r
+                                    U+0398 ISOgrk3 -->\r
+<!ENTITY Iota     "&#921;"> <!-- greek capital letter iota, U+0399 -->\r
+<!ENTITY Kappa    "&#922;"> <!-- greek capital letter kappa, U+039A -->\r
+<!ENTITY Lambda   "&#923;"> <!-- greek capital letter lamda,\r
+                                    U+039B ISOgrk3 -->\r
+<!ENTITY Mu       "&#924;"> <!-- greek capital letter mu, U+039C -->\r
+<!ENTITY Nu       "&#925;"> <!-- greek capital letter nu, U+039D -->\r
+<!ENTITY Xi       "&#926;"> <!-- greek capital letter xi, U+039E ISOgrk3 -->\r
+<!ENTITY Omicron  "&#927;"> <!-- greek capital letter omicron, U+039F -->\r
+<!ENTITY Pi       "&#928;"> <!-- greek capital letter pi, U+03A0 ISOgrk3 -->\r
+<!ENTITY Rho      "&#929;"> <!-- greek capital letter rho, U+03A1 -->\r
+<!-- there is no Sigmaf, and no U+03A2 character either -->\r
+<!ENTITY Sigma    "&#931;"> <!-- greek capital letter sigma,\r
+                                    U+03A3 ISOgrk3 -->\r
+<!ENTITY Tau      "&#932;"> <!-- greek capital letter tau, U+03A4 -->\r
+<!ENTITY Upsilon  "&#933;"> <!-- greek capital letter upsilon,\r
+                                    U+03A5 ISOgrk3 -->\r
+<!ENTITY Phi      "&#934;"> <!-- greek capital letter phi,\r
+                                    U+03A6 ISOgrk3 -->\r
+<!ENTITY Chi      "&#935;"> <!-- greek capital letter chi, U+03A7 -->\r
+<!ENTITY Psi      "&#936;"> <!-- greek capital letter psi,\r
+                                    U+03A8 ISOgrk3 -->\r
+<!ENTITY Omega    "&#937;"> <!-- greek capital letter omega,\r
+                                    U+03A9 ISOgrk3 -->\r
+\r
+<!ENTITY alpha    "&#945;"> <!-- greek small letter alpha,\r
+                                    U+03B1 ISOgrk3 -->\r
+<!ENTITY beta     "&#946;"> <!-- greek small letter beta, U+03B2 ISOgrk3 -->\r
+<!ENTITY gamma    "&#947;"> <!-- greek small letter gamma,\r
+                                    U+03B3 ISOgrk3 -->\r
+<!ENTITY delta    "&#948;"> <!-- greek small letter delta,\r
+                                    U+03B4 ISOgrk3 -->\r
+<!ENTITY epsilon  "&#949;"> <!-- greek small letter epsilon,\r
+                                    U+03B5 ISOgrk3 -->\r
+<!ENTITY zeta     "&#950;"> <!-- greek small letter zeta, U+03B6 ISOgrk3 -->\r
+<!ENTITY eta      "&#951;"> <!-- greek small letter eta, U+03B7 ISOgrk3 -->\r
+<!ENTITY theta    "&#952;"> <!-- greek small letter theta,\r
+                                    U+03B8 ISOgrk3 -->\r
+<!ENTITY iota     "&#953;"> <!-- greek small letter iota, U+03B9 ISOgrk3 -->\r
+<!ENTITY kappa    "&#954;"> <!-- greek small letter kappa,\r
+                                    U+03BA ISOgrk3 -->\r
+<!ENTITY lambda   "&#955;"> <!-- greek small letter lamda,\r
+                                    U+03BB ISOgrk3 -->\r
+<!ENTITY mu       "&#956;"> <!-- greek small letter mu, U+03BC ISOgrk3 -->\r
+<!ENTITY nu       "&#957;"> <!-- greek small letter nu, U+03BD ISOgrk3 -->\r
+<!ENTITY xi       "&#958;"> <!-- greek small letter xi, U+03BE ISOgrk3 -->\r
+<!ENTITY omicron  "&#959;"> <!-- greek small letter omicron, U+03BF NEW -->\r
+<!ENTITY pi       "&#960;"> <!-- greek small letter pi, U+03C0 ISOgrk3 -->\r
+<!ENTITY rho      "&#961;"> <!-- greek small letter rho, U+03C1 ISOgrk3 -->\r
+<!ENTITY sigmaf   "&#962;"> <!-- greek small letter final sigma,\r
+                                    U+03C2 ISOgrk3 -->\r
+<!ENTITY sigma    "&#963;"> <!-- greek small letter sigma,\r
+                                    U+03C3 ISOgrk3 -->\r
+<!ENTITY tau      "&#964;"> <!-- greek small letter tau, U+03C4 ISOgrk3 -->\r
+<!ENTITY upsilon  "&#965;"> <!-- greek small letter upsilon,\r
+                                    U+03C5 ISOgrk3 -->\r
+<!ENTITY phi      "&#966;"> <!-- greek small letter phi, U+03C6 ISOgrk3 -->\r
+<!ENTITY chi      "&#967;"> <!-- greek small letter chi, U+03C7 ISOgrk3 -->\r
+<!ENTITY psi      "&#968;"> <!-- greek small letter psi, U+03C8 ISOgrk3 -->\r
+<!ENTITY omega    "&#969;"> <!-- greek small letter omega,\r
+                                    U+03C9 ISOgrk3 -->\r
+<!ENTITY thetasym "&#977;"> <!-- greek theta symbol,\r
+                                    U+03D1 NEW -->\r
+<!ENTITY upsih    "&#978;"> <!-- greek upsilon with hook symbol,\r
+                                    U+03D2 NEW -->\r
+<!ENTITY piv      "&#982;"> <!-- greek pi symbol, U+03D6 ISOgrk3 -->\r
+\r
+\r
+<!-- General Punctuation -->\r
+<!ENTITY bull     "&#8226;"> <!-- bullet = black small circle,\r
+                                     U+2022 ISOpub  -->\r
+<!-- bullet is NOT the same as bullet operator, U+2219 -->\r
+<!ENTITY hellip   "&#8230;"> <!-- horizontal ellipsis = three dot leader,\r
+                                     U+2026 ISOpub  -->\r
+<!ENTITY prime    "&#8242;"> <!-- prime = minutes = feet, U+2032 ISOtech -->\r
+<!ENTITY Prime    "&#8243;"> <!-- double prime = seconds = inches,\r
+                                     U+2033 ISOtech -->\r
+<!ENTITY oline    "&#8254;"> <!-- overline = spacing overscore,\r
+                                     U+203E NEW -->\r
+<!ENTITY frasl    "&#8260;"> <!-- fraction slash, U+2044 NEW -->\r
+\r
+<!ENTITY infin    "&#8734;"> <!-- infinity, U+221E ISOtech -->\r
+\r
+\r
+<!ENTITY spades   "&#9824;"> <!-- black spade suit, U+2660 ISOpub -->\r
+<!-- black here seems to mean filled as opposed to hollow -->\r
+<!ENTITY clubs    "&#9827;"> <!-- black club suit = shamrock,\r
+                                     U+2663 ISOpub -->\r
+<!ENTITY hearts   "&#9829;"> <!-- black heart suit = valentine,\r
+                                     U+2665 ISOpub -->\r
+<!ENTITY diams    "&#9830;"> <!-- black diamond suit, U+2666 ISOpub -->\r
+\r
+\r
+<!ELEMENT xsl:stylesheet ANY >\r
+<!ATTLIST xsl:stylesheet \r
+  xmlns:xsl CDATA #REQUIRED\r
+  version CDATA #REQUIRED\r
+ >\r
diff --git a/xslt/style.xsl b/xslt/style.xsl
new file mode 100644 (file)
index 0000000..5df7a3c
--- /dev/null
@@ -0,0 +1,201 @@
+<?xml version="1.0"?>
+<!DOCTYPE xsl:stylesheet PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "libxslt/xslt2.dtd">
+<xsl:stylesheet  
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns="http://www.w3.org/1999/xhtml"
+ >
+<!--  xmlns:html="http://www.w3.org/TR/REC-html40" -->
+
+<xsl:output method="xml"
+  media-type="text/xml"
+  doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+  doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
+  omit-xml-declaration="yes"
+/>
+
+<xsl:include href="libxslt/defaultStyle.xsl"/>
+
+<xsl:variable name="staticBaseURL">/</xsl:variable>
+
+<xsl:template match="*" mode="header">
+<h1>LA-Tut-Manager</h1>
+<p><a href="../">go up</a></p>
+
+</xsl:template>
+
+<xsl:template match="form" mode="content">
+This really needs nicer styling from css!
+<p/>
+<xsl:copy-of select="."/>
+</xsl:template>
+
+<xsl:template match="*" mode="footer">
+<hr/>
+© <a href="mailto:mail@joachim-breitner.de">Joachim Breitner</a>
+</xsl:template>
+<!--
+<xsl:template match="*">
+<xsl:copy-of select="."/>
+</xsl:template>
+
+<xsl:template match="xml"><html>
+  now this is the replacement text
+</html>
+</xsl:template>
+-->
+
+<xsl:template match="index" mode="content">
+<ul>
+<li><a href="handins/">HandIns</a></li>
+<li><a href="assignment/">Assignments</a></li>
+<li><a href="student/">Students</a></li>
+</ul>
+</xsl:template>
+
+<xsl:template match="table" mode="content">
+ <table>
+  <tr>
+   <th/>
+   <xsl:for-each select="./tableHead">
+    <th><xsl:value-of select="."/></th>
+   </xsl:for-each>
+  </tr>
+  <xsl:for-each select="./tableRow">
+   <tr>
+    <th><xsl:value-of select="./tableHead"/></th>
+    <xsl:for-each select="./tableCell">
+     <td>
+      <xsl:apply-templates select="." mode="tablecell"/>
+     </td>
+    </xsl:for-each>
+   </tr>
+  </xsl:for-each>
+ </table>
+</xsl:template>
+
+<xsl:template match="handIn" mode="tablecell">
+<xsl:value-of select="./points"/>
+</xsl:template>
+
+<xsl:template match="assignmentsWithHandIns" mode="content">
+
+ <p><a href="add">Add new</a></p>
+ <table>
+  <tr>
+   <th>Assignment</th>
+   <th>Maximum Points</th>
+   <th>Hand Ins</th>
+   <th>Average</th>
+   <th>Actions</th>
+  </tr>
+
+  <xsl:apply-templates select="./assignmentWithHandIns" mode="list"/>
+
+ </table>
+</xsl:template>
+
+<xsl:template match="assignmentWithHandIns" mode="list">
+<tr>
+<td><xsl:value-of select="assignment/assName"/></td>
+<td><xsl:value-of select="assignment/maxPoints"/></td>
+<td><xsl:value-of select="count(./handIn)"/></td>
+<td><xsl:value-of select="sum(./handIn/points) div count(./handIn)"/></td>
+ <td>
+  <a><xsl:attribute name="href">./<xsl:value-of select="assignment/assName"/>/</xsl:attribute>View</a>
+  &nbsp;
+  <a><xsl:attribute name="href">./<xsl:value-of select="assignment/assName"/>/edit</xsl:attribute>Edit</a>
+  &nbsp;
+  <a><xsl:attribute name="href">./<xsl:value-of select="assignment/assName"/>/delete</xsl:attribute>Delete</a>
+ </td>
+</tr>
+</xsl:template>
+
+
+<xsl:template match="students" mode="content">
+
+ <p><a href="add">Add new</a></p>
+ <table>
+  <tr>
+   <th>Student ID</th>
+   <th>eMail</th>
+   <th>Actions</th>
+  </tr>
+
+  <xsl:apply-templates select="./student" mode="list"/>
+
+ </table>
+</xsl:template>
+
+<xsl:template match="student" mode="list">
+<tr>
+ <td><xsl:value-of select="studentID"/></td>
+ <td><xsl:value-of select="eMail"/></td>
+ <td>
+  <a><xsl:attribute name="href">./<xsl:value-of select="studentID"/>/</xsl:attribute>View</a>
+  &nbsp;
+  <a><xsl:attribute name="href">./<xsl:value-of select="studentID"/>/edit</xsl:attribute>Edit</a>
+  &nbsp;
+  <a><xsl:attribute name="href">./<xsl:value-of select="studentID"/>/delete</xsl:attribute>Delete</a>
+ </td>
+</tr>
+</xsl:template>
+
+<xsl:template match="assignment" mode="content">
+<h2>Assignment <xsl:value-of select="assName"/></h2>
+<dl>
+<dt>Punkte </dt><dd><xsl:value-of select="maxPoints"/></dd>
+<dt>Abgaben </dt><dd><xsl:value-of select="count(./handIn)"/></dd>
+<dt>Schnitt </dt><dd><xsl:value-of select="sum(./handIn/points) div count(./handIn)"/></dd>
+<dt>Aktionen </dt><dd><a href="./edit">bearbeiten</a></dd>
+</dl>
+
+<p><a href="add">Add new</a></p>
+<h3>Abgaben</h3>
+<table>
+  <tr>
+   <th>Matrikelnummer</th>
+   <th>Punkte</th>
+  </tr>
+
+  <xsl:apply-templates select="./handIn" mode="list"/>
+</table>
+</xsl:template>
+
+<xsl:template match="student" mode="content">
+<h2>Student <xsl:value-of select="studentID"/></h2>
+<dl>
+<dt>e-Mail </dt><dd><xsl:value-of select="eMail"/></dd>
+<!--
+<dt>Abgaben </dt><dd><xsl:value-of select="count(./handIn)"/></dd>
+<dt>Schnitt </dt><dd><xsl:value-of select="sum(./handIn/points) div count(./handIn)"/></dd>
+-->
+<dt>Aktionen </dt><dd><a href="./edit">bearbeiten</a></dd>
+</dl>
+</xsl:template>
+
+<xsl:template match="handIn" mode="list">
+<tr>
+ <td><xsl:value-of select="studentID"/></td>
+ <td><xsl:value-of select="points"/></td>
+ <td>
+  <a><xsl:attribute name="href">./<xsl:value-of select="studentID"/>/edit</xsl:attribute>Edit</a>
+  &nbsp;
+  <a><xsl:attribute name="href">./<xsl:value-of select="studentID"/>/delete</xsl:attribute>Delete</a>
+ </td>
+</tr>
+</xsl:template>
+
+<xsl:template match="handIn" mode="content">
+<dl>
+ <dt>Matrikelnummer</dt><dd><xsl:value-of select="studentID"/></dd>
+ <dt>Punkte</dt><dd><xsl:value-of select="points"/></dd>
+ <dt>Aktionen</dt>
+ <dd>
+  <a><xsl:attribute name="href">./edit</xsl:attribute>Edit</a>
+  &nbsp;
+  <a><xsl:attribute name="href">./delete</xsl:attribute>Delete</a>
+ </dd>
+</dl>
+</xsl:template>
+
+</xsl:stylesheet>