| 1 |
<?xml version='1.0'?> |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
<xsl:stylesheet |
| 13 |
version='1.0' |
| 14 |
xmlns:xsl='http://www.w3.org/1999/XSL/Transform' |
| 15 |
xmlns:dtb="http://www.daisy.org/z3986/2005/dtbook/" |
| 16 |
xmlns:louis="http://liblouis.org/liblouis" |
| 17 |
exclude-result-prefixes="dtb"> |
| 18 |
|
| 19 |
<xsl:output omit-xml-declaration="no" encoding="UTF-8" method="xml" |
| 20 |
indent="yes" media-type="text/xml"/> |
| 21 |
|
| 22 |
<xsl:param name="translation_table">de-ch-g2.ctb</xsl:param> |
| 23 |
|
| 24 |
<xsl:template match="dtb:em"> |
| 25 |
<xsl:apply-templates mode="italic"/> |
| 26 |
</xsl:template> |
| 27 |
|
| 28 |
<xsl:template match="dtb:strong"> |
| 29 |
<xsl:apply-templates mode="bold"/> |
| 30 |
</xsl:template> |
| 31 |
|
| 32 |
<xsl:template match="text()"> |
| 33 |
<xsl:value-of select='louis:translate(string(),string($translation_table))'/> |
| 34 |
</xsl:template> |
| 35 |
|
| 36 |
<xsl:template match="text()" mode="italic"> |
| 37 |
<xsl:value-of select='louis:translate(string(),string($translation_table),"italic")'/> |
| 38 |
</xsl:template> |
| 39 |
|
| 40 |
<xsl:template match="text()" mode="bold"> |
| 41 |
<xsl:value-of select='louis:translate(string(),string($translation_table),"bold")'/> |
| 42 |
</xsl:template> |
| 43 |
|
| 44 |
<xsl:template match="@*|node()"> |
| 45 |
<xsl:copy> |
| 46 |
<xsl:apply-templates select="@*|node()"/> |
| 47 |
</xsl:copy> |
| 48 |
</xsl:template> |
| 49 |
|
| 50 |
</xsl:stylesheet> |
| 51 |
|