1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/java/dictionary-generator/concept.h.xsl Wed Jul 10 20:48:18 2013 +0200
1.3 @@ -0,0 +1,75 @@
1.4 +<?xml version="1.0" encoding="UTF-8"?>
1.5 +<xsl:stylesheet version="1.0"
1.6 + xmlns="http://www.w3.org/1999/xhtml"
1.7 + xmlns:h="http://www.w3.org/1999/xhtml"
1.8 + xmlns:d="https://telco.frantovo.cz/xmlns/dictionary"
1.9 + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
1.10 + xmlns:fn="http://www.w3.org/2005/xpath-functions"
1.11 + xmlns:xs="http://www.w3.org/2001/XMLSchema"
1.12 + exclude-result-prefixes="fn h d xs">
1.13 + <xsl:output
1.14 + method="xml"
1.15 + indent="no"
1.16 + encoding="UTF-8"
1.17 + omit-xml-declaration="yes"/>
1.18 +
1.19 + <xsl:param name="tags"/>
1.20 +
1.21 + <!--
1.22 + XHTML template
1.23 + -->
1.24 + <xsl:template match="d:concept">
1.25 + <div>
1.26 + <!--
1.27 + This template should be shortened,
1.28 + if used for dictionaries containing many words.
1.29 + -->
1.30 + <style type="text/css">
1.31 + table {
1.32 + border-collapse:collapse;
1.33 + box-shadow: 3px 3px 3px grey;
1.34 + margin-top: 10px;
1.35 + margin-bottom: 10px;
1.36 + }
1.37 + td, th {
1.38 + border: 1px solid black;
1.39 + padding-top: 4px;
1.40 + padding-bottom: 4px;
1.41 + padding-left: 6px;
1.42 + padding-right: 6px;
1.43 + font-weight: normal;
1.44 + }
1.45 + p.tags {
1.46 + font-size: 80%;
1.47 + }
1.48 + </style>
1.49 + <table style="color: red;">
1.50 + <tbody>
1.51 + <xsl:for-each select="d:term">
1.52 + <tr>
1.53 + <td><xsl:value-of select="@abbreviation"/></td>
1.54 + <td><xsl:value-of select="@completeForm"/></td>
1.55 + </tr>
1.56 + </xsl:for-each>
1.57 + </tbody>
1.58 + </table>
1.59 +
1.60 + <p><xsl:apply-templates select="d:explanation"/></p>
1.61 +
1.62 + <xsl:if test="d:tag">
1.63 + <p class="tags">
1.64 + <xsl:text>Tags: </xsl:text>
1.65 + <xsl:for-each select="d:tag">
1.66 + <xsl:variable name="tagID" select="text()"/>
1.67 + <xsl:apply-templates/>
1.68 + <!--
1.69 + <xsl:value-of select="$tags/d:tag[@id=$tagID]/@name"/>
1.70 + -->
1.71 + <xsl:if test="not(position() = last())"><xsl:text>, </xsl:text></xsl:if>
1.72 + </xsl:for-each>
1.73 + </p>
1.74 + </xsl:if>
1.75 + </div>
1.76 + </xsl:template>
1.77 +
1.78 +</xsl:stylesheet>