Statistics
| Revision:

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

History | View | Annotate | Download (2.4 kB)

1 476 mdecorde
<?xml version="1.0"?>
2 476 mdecorde
<xsl:stylesheet
3 476 mdecorde
  xmlns:xd="http://www.pnp-software.com/XSLTdoc"
4 476 mdecorde
  xmlns:edate="http://exslt.org/dates-and-times"
5 476 mdecorde
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0"
6 476 mdecorde
  xmlns:me="http://www.menota.org/ns/1.0"
7 476 mdecorde
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
8 476 mdecorde
  exclude-result-prefixes="#all"
9 476 mdecorde
  version="2.0">
10 476 mdecorde
11 476 mdecorde
  <xd:doc type="stylesheet">
12 476 mdecorde
    <xd:short>
13 476 mdecorde
14 476 mdecorde
    </xd:short>
15 476 mdecorde
    <xd:detail>
16 476 mdecorde
      This stylesheet is free software; you can redistribute it and/or
17 476 mdecorde
      modify it under the terms of the GNU Lesser General Public
18 476 mdecorde
      License as published by the Free Software Foundation; either
19 476 mdecorde
      version 3 of the License, or (at your option) any later version.
20 476 mdecorde
21 476 mdecorde
      This stylesheet is distributed in the hope that it will be useful,
22 476 mdecorde
      but WITHOUT ANY WARRANTY; without even the implied warranty of
23 476 mdecorde
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
24 476 mdecorde
      Lesser General Public License for more details.
25 476 mdecorde
26 476 mdecorde
      You should have received a copy of GNU Lesser Public License with
27 476 mdecorde
      this stylesheet. If not, see http://www.gnu.org/licenses/lgpl.html
28 476 mdecorde
    </xd:detail>
29 476 mdecorde
    <xd:author>Alexei Lavrentiev alexei.lavrentev@ens-lyon.fr</xd:author>
30 476 mdecorde
    <xd:copyright>2012, CNRS / ICAR (ICAR3 LinCoBaTO)</xd:copyright>
31 476 mdecorde
  </xd:doc>
32 476 mdecorde
33 476 mdecorde
34 476 mdecorde
  <xsl:output method="xml" encoding="utf-8"/>
35 476 mdecorde
36 476 mdecorde
  <xsl:strip-space elements="*"/>
37 476 mdecorde
38 476 mdecorde
  <xsl:template match="/">
39 476 mdecorde
    <text>
40 476 mdecorde
      <xsl:apply-templates select="descendant::tei:w|descendant::tei:pc"/>
41 476 mdecorde
    </text>
42 476 mdecorde
  </xsl:template>
43 476 mdecorde
44 476 mdecorde
45 476 mdecorde
<xsl:template match="tei:w|tei:pc">
46 476 mdecorde
  <xsl:call-template name="word"/>
47 476 mdecorde
</xsl:template>
48 476 mdecorde
49 476 mdecorde
  <xsl:template match="tei:seg[@type='wp']">
50 476 mdecorde
    <xsl:call-template name="word"/>
51 476 mdecorde
  </xsl:template>
52 476 mdecorde
53 476 mdecorde
  <xsl:template name="word">
54 476 mdecorde
    <!--<xsl:if test="self::tei:w"></xsl:if>-->
55 476 mdecorde
    <xsl:choose>
56 476 mdecorde
      <xsl:when test="descendant::tei:lb">
57 476 mdecorde
        <xsl:apply-templates select="tei:seg[@type='wp']"/>
58 476 mdecorde
      </xsl:when>
59 476 mdecorde
      <xsl:when test="matches(@xml:id,'[a-z]$')">
60 476 mdecorde
        <w-add id="{@xml:id}"><xsl:apply-templates/></w-add>
61 476 mdecorde
        <xsl:text>&#xa;</xsl:text>
62 476 mdecorde
      </xsl:when>
63 476 mdecorde
      <xsl:otherwise>
64 476 mdecorde
        <w id="{@xml:id}"><xsl:apply-templates/></w>
65 476 mdecorde
        <xsl:text>&#xa;</xsl:text>
66 476 mdecorde
      </xsl:otherwise>
67 476 mdecorde
    </xsl:choose>
68 476 mdecorde
69 476 mdecorde
  </xsl:template>
70 476 mdecorde
71 476 mdecorde
  <xsl:template match="tei:choice">
72 476 mdecorde
    <xsl:apply-templates select="tei:abbr|tei:orig|tei:sic"/>
73 476 mdecorde
  </xsl:template>
74 476 mdecorde
75 476 mdecorde
</xsl:stylesheet>