Statistics
| Revision:

root / tmp / org.txm.oriflamms.rcp / bin / oriflamms-patch-expan-fontenay.xsl @ 476

History | View | Annotate | Download (2.5 kB)

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

    
11
  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no" indent="yes"/>
12
  
13
  <xd:doc type="stylesheet">
14
    <xd:short>
15
      Cette feuille permet de repérer les lettres supprimées dans les
16
      résolution des abréviations
17
    </xd:short>
18
    <xd:detail>
19
      This stylesheet is free software; you can redistribute it and/or
20
      modify it under the terms of the GNU Lesser General Public
21
      License as published by the Free Software Foundation; either
22
      version 3 of the License, or (at your option) any later version.
23
      
24
      This stylesheet is distributed in the hope that it will be useful,
25
      but WITHOUT ANY WARRANTY; without even the implied warranty of
26
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
27
      Lesser General Public License for more details.
28
      
29
      You should have received a copy of GNU Lesser Public License with
30
      this stylesheet. If not, see http://www.gnu.org/licenses/lgpl.html
31
    </xd:detail>
32
    <xd:author>Alexei Lavrentiev alexei.lavrentev@ens-lyon.fr</xd:author>
33
    <xd:copyright>2015, CNRS / ICAR (Équipe CACTUS)</xd:copyright>
34
  </xd:doc>
35
  
36
  <xsl:strip-space elements="*"/>
37
  
38
  
39
  <xsl:template match="node()">
40
    <!-- Copy the current node -->
41
    <xsl:copy>
42
      <!-- Including any attributes it has and any child nodes -->
43
      <xsl:apply-templates select="@*|node()"/>
44
    </xsl:copy>
45
  </xsl:template>
46

    
47
  <!-- On supprime les attributs par défaut de la DTD TEI -->
48
  
49
  <xsl:template match="@*">
50
    <xsl:copy/>
51
  </xsl:template>
52

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

    
66

    
67
</xsl:stylesheet>