root / tmp / org.txm.oriflamms.rcp / res / oriflamms-transcr-2-w-id-table-Fontenay.xsl @ 476
History | View | Annotate | Download (2.4 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" xmlns:tei="http://www.tei-c.org/ns/1.0" |
6 |
xmlns:me="http://www.menota.org/ns/1.0" |
7 |
xmlns:xs="http://www.w3.org/2001/XMLSchema" |
8 |
exclude-result-prefixes="#all" |
9 |
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 select="descendant::tei:w|descendant::tei:pc"/> |
41 |
</text> |
42 |
</xsl:template> |
43 |
|
44 |
|
45 |
<xsl:template match="tei:w|tei:pc"> |
46 |
<xsl:call-template name="word"/> |
47 |
</xsl:template> |
48 |
|
49 |
<xsl:template match="tei:seg[@type='wp']"> |
50 |
<xsl:call-template name="word"/> |
51 |
</xsl:template> |
52 |
|
53 |
<xsl:template name="word"> |
54 |
<!--<xsl:if test="self::tei:w"></xsl:if>--> |
55 |
<xsl:choose> |
56 |
<xsl:when test="descendant::tei:lb"> |
57 |
<xsl:apply-templates select="tei:seg[@type='wp']"/> |
58 |
</xsl:when> |
59 |
<xsl:when test="matches(@xml:id,'[a-z]$')"> |
60 |
<w-add id="{@xml:id}"><xsl:apply-templates/></w-add> |
61 |
<xsl:text>
</xsl:text> |
62 |
</xsl:when> |
63 |
<xsl:otherwise> |
64 |
<w id="{@xml:id}"><xsl:apply-templates/></w> |
65 |
<xsl:text>
</xsl:text> |
66 |
</xsl:otherwise> |
67 |
</xsl:choose> |
68 |
|
69 |
</xsl:template> |
70 |
|
71 |
<xsl:template match="tei:choice"> |
72 |
<xsl:apply-templates select="tei:abbr|tei:orig|tei:sic"/> |
73 |
</xsl:template> |
74 |
|
75 |
</xsl:stylesheet> |