Revision 5713
Added by ben leinfelder over 13 years ago
eml-text.xsl | ||
---|---|---|
31 | 31 |
--> |
32 | 32 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
33 | 33 |
|
34 |
<xsl:output method="html" encoding="iso-8859-1"
|
|
34 |
<xsl:output method="html" encoding="UTF-8"
|
|
35 | 35 |
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" |
36 | 36 |
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" |
37 | 37 |
indent="yes" /> |
... | ... | |
54 | 54 |
<!-- Template for section--> |
55 | 55 |
<xsl:template match="section" mode="text"> |
56 | 56 |
<xsl:if test="normalize-space(.)!=''"> |
57 |
<div class="sectionText"> |
|
57 | 58 |
<xsl:if test="title and normalize-space(title)!=''"> |
58 | 59 |
<h4 class="bold"><xsl:value-of select="title"/></h4> |
59 | 60 |
</xsl:if> |
... | ... | |
63 | 64 |
<xsl:if test="section and normalize-space(section)!=''"> |
64 | 65 |
<xsl:apply-templates select="section" mode="lowlevel"/> |
65 | 66 |
</xsl:if> |
67 |
</div> |
|
66 | 68 |
</xsl:if> |
67 | 69 |
</xsl:template> |
68 | 70 |
|
69 | 71 |
<!-- Section template for low level. Cteate a nested table and second column --> |
70 | 72 |
<xsl:template match="section" mode="lowlevel"> |
71 |
<div> |
|
73 |
<div class="section">
|
|
72 | 74 |
<xsl:if test="title and normalize-space(title)!=''"> |
73 | 75 |
<h4 class="bold"><xsl:value-of select="title"/></h4> |
74 | 76 |
</xsl:if> |
... | ... | |
83 | 85 |
|
84 | 86 |
<!-- para template for text mode--> |
85 | 87 |
<xsl:template match="para" mode="text"> |
86 |
<xsl:param name="textfirstColStyle"/> |
|
87 |
<xsl:apply-templates mode="lowlevel"/> |
|
88 |
<xsl:param name="textfirstColStyle"/> |
|
89 |
<div class="para"> |
|
90 |
<xsl:apply-templates mode="lowlevel"/> |
|
91 |
</div> |
|
88 | 92 |
</xsl:template> |
89 | 93 |
|
90 | 94 |
<!-- para template without table structure. It does actually transfer. |
91 | 95 |
Currently, only get the text and it need more revision--> |
92 | 96 |
<xsl:template match="para" mode="lowlevel"> |
93 |
<p><xsl:value-of select="."/></p> |
|
97 |
<xsl:if test="normalize-space(./text()) = ''"> |
|
98 |
<xsl:apply-templates mode="lowlevel"/> |
|
99 |
</xsl:if> |
|
100 |
<p> |
|
101 |
<xsl:call-template name="i18n"> |
|
102 |
<xsl:with-param name="i18nElement" select="."/> |
|
103 |
</xsl:call-template> |
|
104 |
</p> |
|
94 | 105 |
</xsl:template> |
106 |
|
|
107 |
<!-- match any translation values --> |
|
108 |
<xsl:template match="value" mode="lowlevel"> |
|
109 |
<span class="translation"> |
|
110 |
<!-- the primary value --> |
|
111 |
<xsl:if test="./text() != ''"> |
|
112 |
<xsl:if test="./@xml:lang != ''"> |
|
113 |
(<xsl:value-of select="./@xml:lang"/>) |
|
114 |
</xsl:if> |
|
115 |
<xsl:value-of select="./text()"/> |
|
116 |
</xsl:if> |
|
117 |
</span> |
|
118 |
</xsl:template> |
|
95 | 119 |
|
96 | 120 |
</xsl:stylesheet> |
Also available in: Unified diff
handle i18n translation elements that are included in eml 2.1.1