Statistics
| Revision:

root / tmp / org.txm.oriflamms.rcp / res / oriflamms-patch-expan-fontenay.xsl @ 2398

History | View | Annotate | Download (2.4 kB)

1
<?xml version="1.0"?>
2
<xsl:stylesheet
3
	xmlns:edate="http://exslt.org/dates-and-times"
4
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5
	xmlns:tei="http://www.tei-c.org/ns/1.0"
6
	xmlns:xd="http://www.pnp-software.com/XSLTdoc"
7
	xmlns:txm="http://textometrie.org/1.0"
8
	xmlns:xi="http://www.w3.org/2001/XInclude"
9
	xmlns:svg="http://www.w3.org/2000/svg"
10
	xmlns:math="http://www.w3.org/1998/Math/MathML"
11
	exclude-result-prefixes="tei edate xd txm xi svg math" version="2.0">
12

    
13
	<xsl:output method="xml" encoding="utf-8"
14
		omit-xml-declaration="no" indent="yes" />
15

    
16
	<xd:doc type="stylesheet">
17
		<xd:short>
18
			Cette feuille permet de repérer les lettres supprimées dans les
19
			résolution des abréviations
20
		</xd:short>
21
		<xd:detail>
22
			This stylesheet is free software; you can redistribute it and/or
23
			modify it under the terms of the GNU Lesser General Public
24
			License as published by the Free Software Foundation; either
25
			version 3 of the License, or (at your option) any later version.
26

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

    
32
			You should have received a copy of GNU Lesser Public License with
33
			this stylesheet. If not, see http://www.gnu.org/licenses/lgpl.html
34
		</xd:detail>
35
		<xd:author>Alexei Lavrentiev alexei.lavrentev@ens-lyon.fr</xd:author>
36
		<xd:copyright>2015, CNRS / ICAR (Équipe CACTUS)</xd:copyright>
37
	</xd:doc>
38

    
39
	<xsl:strip-space elements="*" />
40

    
41

    
42
	<xsl:template match="node()">
43
		<!-- Copy the current node -->
44
		<xsl:copy>
45
			<!-- Including any attributes it has and any child nodes -->
46
			<xsl:apply-templates select="@*|node()" />
47
		</xsl:copy>
48
	</xsl:template>
49

    
50
	<!-- On supprime les attributs par défaut de la DTD TEI -->
51

    
52
	<xsl:template match="@*">
53
		<xsl:copy />
54
	</xsl:template>
55

    
56
	<xsl:template match="tei:expan">
57
		<xsl:choose>
58
			<xsl:when test="matches(.,'^(par|per)$','i')">
59
				<xsl:analyze-string select="." regex="(.)(..)">
60
					<xsl:matching-substring>
61
						<xsl:value-of select="regex-group(1)" />
62
						<ex xmlns="http://www.tei-c.org/ns/1.0">
63
							<xsl:value-of select="regex-group(2)"></xsl:value-of>
64
						</ex>
65
					</xsl:matching-substring>
66
				</xsl:analyze-string>
67
			</xsl:when>
68
		</xsl:choose>
69
	</xsl:template>
70

    
71

    
72
</xsl:stylesheet>