Statistics
| Revision:

root / tmp / org.txm.core / res / org / txm / xml / xsl / txm-filter-teiperseus-xmlw.xsl @ 187

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
  exclude-result-prefixes="tei edate xd" version="2.0">
7
  
8
  <xsl:import href="txm-filter-teip5-xmlw-preserve.xsl"/>
9
  <xd:doc type="stylesheet">
10
    <xd:short>
11
      A stylesheet to prepare PERSEUS XML-TEI texts to TXM import.
12
    </xd:short>
13
    <xd:detail>
14
      This stylesheet is free software; you can redistribute it and/or
15
      modify it under the terms of the GNU Lesser General Public
16
      License as published by the Free Software Foundation; either
17
      version 3 of the License, or (at your option) any later version.
18
      
19
      This stylesheet is distributed in the hope that it will be useful,
20
      but WITHOUT ANY WARRANTY; without even the implied warranty of
21
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22
      Lesser General Public License for more details.
23
      
24
      You should have received a copy of GNU Lesser Public License with
25
      this stylesheet. If not, see http://www.gnu.org/licenses/lgpl.html
26
    </xd:detail>
27
    <xd:author>Alexei Lavrentiev alexei.lavrentev@ens-lyon.fr</xd:author>
28
    <xd:copyright>2012, CNRS / ICAR (ICAR3 LinCoBaTO)</xd:copyright>
29
  </xd:doc>
30
  
31

    
32
  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no"/>
33
  
34
  <xsl:template match="//tei:text">
35
    <xsl:copy>
36
      <xsl:copy-of select="@*"/>
37
      <xsl:attribute name="author"><xsl:value-of select="//tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:author"/></xsl:attribute>
38
      <xsl:attribute name="title"><xsl:value-of select="//tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:title[@type='work']"/></xsl:attribute>
39
      <xsl:attribute name="editor"><xsl:value-of select="//tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:editor"/></xsl:attribute>
40
      <xsl:apply-templates/>
41
    </xsl:copy>
42
  </xsl:template>
43
  
44
<xsl:template match="//tei:sp">
45
  <div3 type="sp" xmlns="http://www.tei-c.org/ns/1.0">
46
    <xsl:apply-templates/>    
47
  </div3>
48
</xsl:template>  
49

    
50
<xsl:template match="//tei:speaker">
51
  <head><xsl:apply-templates/></head>
52
</xsl:template>
53
  
54
  <xsl:template match="//tei:bibl">
55
    <note type="bibl" xmlns="http://www.tei-c.org/ns/1.0"><xsl:apply-templates/></note>
56
  </xsl:template>
57
</xsl:stylesheet>