Statistics
| Revision:

root / tmp / org.txm.core / res / org / txm / xml / xsl / tei / fo2 / teiCustom.xsl @ 187

History | View | Annotate | Download (2.6 kB)

1
<?xml version="1.0" encoding="utf-8"?>
2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
                xmlns:fotex="http://www.tug.org/fotex"
4
                xmlns="http://www.w3.org/1999/XSL/Format"
5
                xmlns:tei="http://www.tei-c.org/ns/1.0"
6
                version="1.0">
7
    <xsl:import href="tei.xsl"/>
8
    
9
    <!-- oXygen begin change -->
10
    <!--
11
        The default value of the 'tableAlign' param set in common/ tei-param.xsl is 
12
        'leftTable' which is not a standard XSL-FO value for this param. It is reported 
13
        as error by both Apache FOP and XEP. We set the default value to a 
14
        standard one.
15
    -->
16
    <xsl:param name="tableAlign">left</xsl:param>
17
    <!-- oXygen end change -->
18
    
19
    <xsl:template match="tei:table">
20
        <xsl:choose>
21
            <xsl:when test="@rend='eqnarray' and $foEngine='passivetex'">
22
                <fotex:eqnarray>
23
                    <xsl:apply-templates select=".//tei:formula"/>
24
                </fotex:eqnarray>
25
            </xsl:when>
26
            <xsl:when test=".//tei:formula[@type='subeqn'] and $foEngine='passivetex'">
27
                <fotex:eqnarray>
28
                    <xsl:apply-templates select=".//tei:formula"/>
29
                </fotex:eqnarray>
30
            </xsl:when>
31
            <xsl:when test="$inlineTables or @rend='inline'">
32
                <xsl:if test="tei:head">
33
                    <block>
34
                        <xsl:call-template name="tableCaptionstyle"/>
35
                        <!-- oXygen begin change -->
36
                        <!-- 
37
                            The same ID attribute value generated from the same node of the XML
38
                            source cannot be added to two different elements of the XSL-FO result,
39
                            that is an fo:block and a child element fo:table. Here we skip adding the ID
40
                            attribute for the child element.
41
                        -->
42
                        <!-- <xsl:call-template name="addID"/> -->
43
                        <!-- oXygen end change -->
44
                        <xsl:if test="$makeTableCaption='true'">
45
                            <xsl:call-template name="calculateTableNumber"/>
46
                            <xsl:text>. </xsl:text>
47
                        </xsl:if>
48
                        <xsl:apply-templates select="tei:head"/>
49
                    </block>
50
                </xsl:if>
51
                <xsl:call-template name="blockTable"/>
52
            </xsl:when>
53
            <xsl:otherwise>
54
                <xsl:call-template name="floatTable"/>
55
            </xsl:otherwise>
56
        </xsl:choose>
57
    </xsl:template>
58
</xsl:stylesheet>