1 |
26600
|
sandro.lab
|
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
|
|
<!-- $Id: htm-teidiv.xsl 1793 2012-09-11 17:43:31Z gabrielbodard $ -->
|
3 |
|
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
4 |
|
|
xmlns:t="http://www.tei-c.org/ns/1.0" exclude-result-prefixes="t"
|
5 |
|
|
version="2.0">
|
6 |
|
|
|
7 |
|
|
<xsl:template match="t:div">
|
8 |
|
|
<!-- div[@type = 'edition']" and div[@type='textpart'] can be found in htm-teidivedition.xsl -->
|
9 |
|
|
<div>
|
10 |
|
|
<xsl:if test="parent::t:body and @type">
|
11 |
|
|
<xsl:attribute name="id">
|
12 |
|
|
<xsl:value-of select="@type"/>
|
13 |
|
|
</xsl:attribute>
|
14 |
|
|
</xsl:if>
|
15 |
|
|
<!-- Temporary headings so we know what is where -->
|
16 |
|
|
<xsl:if test="not(t:head)">
|
17 |
|
|
<xsl:choose>
|
18 |
|
|
<xsl:when test="@type = 'translation'">
|
19 |
|
|
<h2>
|
20 |
|
|
<xsl:value-of select="/t:TEI/t:teiHeader/t:profileDesc/t:langUsage/t:language[@ident = current()/@xml:lang]"/>
|
21 |
|
|
<xsl:text> </xsl:text>
|
22 |
|
|
<xsl:value-of select="@type"/>
|
23 |
|
|
</h2>
|
24 |
|
|
</xsl:when>
|
25 |
|
|
<xsl:otherwise>
|
26 |
|
|
<h2>
|
27 |
|
|
<xsl:value-of select="@type"/>
|
28 |
|
|
<xsl:if test="string(@subtype)">
|
29 |
|
|
<xsl:text>: </xsl:text>
|
30 |
|
|
<xsl:value-of select="@subtype"/>
|
31 |
|
|
</xsl:if>
|
32 |
|
|
</h2>
|
33 |
|
|
</xsl:otherwise>
|
34 |
|
|
</xsl:choose>
|
35 |
|
|
</xsl:if>
|
36 |
|
|
|
37 |
|
|
<!-- Body of the div -->
|
38 |
|
|
<xsl:apply-templates/>
|
39 |
|
|
|
40 |
|
|
</div>
|
41 |
|
|
|
42 |
|
|
</xsl:template>
|
43 |
|
|
|
44 |
|
|
</xsl:stylesheet>
|