Debian Codegraph @

python/examples/dtbook2brldtbook.xsl

raw symbols SCIP
1 <?xml version='1.0'?>
2
3 <!-- liblouis Braille Translation and Back-Translation Library -->
4
5 <!-- Copyright (C) 2010 Swiss Library for the Blind, Visually Impaired and Print Disabled -->
6
7 <!-- Copying and distribution of this file, with or without modification, -->
8 <!-- are permitted in any medium without royalty provided the copyright -->
9 <!-- notice and this notice are preserved. This file is offered as-is, -->
10 <!-- without any warranty. -->
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