Statistics
| Revision:

root / tmp / org.txm.oriflamms.rcp / res / oriflamms-transcr-2-w-id-table-Fontenay.xsl @ 2398

History | View | Annotate | Download (2.3 kB)

1
<?xml version="1.0"?>
2
<xsl:stylesheet
3
	xmlns:xd="http://www.pnp-software.com/XSLTdoc"
4
	xmlns:edate="http://exslt.org/dates-and-times"
5
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6
	xmlns:tei="http://www.tei-c.org/ns/1.0"
7
	xmlns:me="http://www.menota.org/ns/1.0"
8
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
9
	exclude-result-prefixes="#all" version="2.0">
10

    
11
	<xd:doc type="stylesheet">
12
		<xd:short>
13

    
14
		</xd:short>
15
		<xd:detail>
16
			This stylesheet is free software; you can redistribute it and/or
17
			modify it under the terms of the GNU Lesser General Public
18
			License as published by the Free Software Foundation; either
19
			version 3 of the License, or (at your option) any later version.
20

    
21
			This stylesheet is distributed in the hope that it will be useful,
22
			but WITHOUT ANY WARRANTY; without even the implied warranty of
23
			MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24
			Lesser General Public License for more details.
25

    
26
			You should have received a copy of GNU Lesser Public License with
27
			this stylesheet. If not, see http://www.gnu.org/licenses/lgpl.html
28
		</xd:detail>
29
		<xd:author>Alexei Lavrentiev alexei.lavrentev@ens-lyon.fr</xd:author>
30
		<xd:copyright>2012, CNRS / ICAR (ICAR3 LinCoBaTO)</xd:copyright>
31
	</xd:doc>
32

    
33

    
34
	<xsl:output method="xml" encoding="utf-8" />
35

    
36
	<xsl:strip-space elements="*" />
37

    
38
	<xsl:template match="/">
39
		<text>
40
			<xsl:apply-templates
41
				select="descendant::tei:w|descendant::tei:pc" />
42
		</text>
43
	</xsl:template>
44

    
45

    
46
	<xsl:template match="tei:w|tei:pc">
47
		<xsl:call-template name="word" />
48
	</xsl:template>
49

    
50
	<xsl:template match="tei:seg[@type='wp']">
51
		<xsl:call-template name="word" />
52
	</xsl:template>
53

    
54
	<xsl:template name="word">
55
		<!--<xsl:if test="self::tei:w"></xsl:if> -->
56
		<xsl:choose>
57
			<xsl:when test="descendant::tei:lb">
58
				<xsl:apply-templates
59
					select="tei:seg[@type='wp']" />
60
			</xsl:when>
61
			<xsl:when test="matches(@xml:id,'[a-z]$')">
62
				<w-add id="{@xml:id}">
63
					<xsl:apply-templates />
64
				</w-add>
65
				<xsl:text>&#xa;</xsl:text>
66
			</xsl:when>
67
			<xsl:otherwise>
68
				<w id="{@xml:id}">
69
					<xsl:apply-templates />
70
				</w>
71
				<xsl:text>&#xa;</xsl:text>
72
			</xsl:otherwise>
73
		</xsl:choose>
74

    
75
	</xsl:template>
76

    
77
	<xsl:template match="tei:choice">
78
		<xsl:apply-templates
79
			select="tei:abbr|tei:orig|tei:sic" />
80
	</xsl:template>
81

    
82
</xsl:stylesheet>