gfl-indexer.xslt 1.1 KB
Newer Older
Dennis Neumann's avatar
Dennis Neumann committed
1
2
3
<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
   xpath-default-namespace="http://www.tei-c.org/ns/1.0" xmlns:gfl="http://sub.gfl.de"
   xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:saxon="http://saxon.sf.net/" exclude-result-prefixes="gfl saxon xs">

   <xsl:output method="xml" indent="yes" />
   <xsl:strip-space elements="*" />

   <xsl:param name="currentArticleId" />

   <xsl:template match="/">
      <add>
         <doc>
            <field name="id">
               <xsl:value-of select="$currentArticleId" />
            </field>
            <field name="fulltext">
               <xsl:apply-templates select="TEI/text/body/*" />
            </field>
         </doc>
      </add>
   </xsl:template>

   <xsl:template match="p">
      <xsl:apply-templates select="*|text()" />
   </xsl:template>

   <xsl:template match="text()">
      <xsl:value-of select="." />
   </xsl:template>

   <xsl:template match="lb">
      <xsl:text> </xsl:text>
   </xsl:template>
Dennis Neumann's avatar
Dennis Neumann committed
36

37
38
39
   <xsl:template match="note[@type='com']">
   </xsl:template>

Dennis Neumann's avatar
Dennis Neumann committed
40
</xsl:stylesheet>