title.xsl 983 Bytes
Newer Older
Nyashes's avatar
Nyashes committed
1
2
3
4
5
6
<?xml version="1.0" encoding="UTF-8"?>
<?target hdoc/content.xml ?>
<xsl:stylesheet version="2.0" xpath-default-namespace="http://www.utc.fr/ics/hdoc/xhtml"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:h2m="http://www.utc.fr/hdoc/hdoc_to_mongo">
    <xsl:import href="../xsl-import/string.xsl"/>
Nyashes's avatar
Nyashes committed
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
    <xsl:template name="title-main">
        <xsl:choose>
            <xsl:when test="../section">
                <xsl:call-template name="title-section"></xsl:call-template>
            </xsl:when>
            <xsl:otherwise>
                <xsl:call-template name="title-rootDocument"></xsl:call-template>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    <xsl:template name="title-section">
        <xsl:value-of select="h2m:escape-string(header/h1/text())"/>
    </xsl:template>
    <xsl:template name="title-rootDocument">
        <xsl:value-of select="h2m:escape-string(/html/head/title/text())"/>
Nyashes's avatar
Nyashes committed
22
23
    </xsl:template>
</xsl:stylesheet>