aboutsummaryrefslogtreecommitdiff
path: root/lib/export
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+github@gmail.com>2021-07-22 16:07:19 +0200
committerJan-Hendrik Willms <tleilax+github@gmail.com>2021-07-22 16:19:12 +0200
commita3da1483a9e689846179159355badfec8073dbec (patch)
tree770dcca6bdf5f6f2a11b0e7fcbbeda6919a3fc52 /lib/export
current code from svn, revision 62608
Diffstat (limited to 'lib/export')
-rw-r--r--lib/export/csv-p-1.xsl96
-rw-r--r--lib/export/csv-p-2.xsl72
-rw-r--r--lib/export/csv-t-1.xsl196
-rw-r--r--lib/export/csv-t-2.xsl194
-rw-r--r--lib/export/csv-t-3.xsl189
-rw-r--r--lib/export/csv-v-1.xsl120
-rw-r--r--lib/export/csv-v-2.xsl66
-rw-r--r--lib/export/export_choose_xslt.inc.php243
-rw-r--r--lib/export/export_config.inc.php42
-rw-r--r--lib/export/export_linking_func.inc.php222
-rw-r--r--lib/export/export_run_fop.inc.php132
-rw-r--r--lib/export/export_run_xslt.inc.php219
-rw-r--r--lib/export/export_start.inc.php137
-rw-r--r--lib/export/export_studipdata_func.inc.php925
-rw-r--r--lib/export/export_tmp_gc.inc.php64
-rw-r--r--lib/export/export_view.inc.php110
-rw-r--r--lib/export/export_xml.inc.php167
-rw-r--r--lib/export/export_xml_func.inc.php150
-rw-r--r--lib/export/export_xml_vars.inc.php118
-rw-r--r--lib/export/export_xslt_vars.inc.php192
-rw-r--r--lib/export/html-t-1.xsl116
-rw-r--r--lib/export/html-v-4.xsl380
-rw-r--r--lib/export/html-vp-1.xsl478
-rw-r--r--lib/export/html-vp-2.xsl473
-rw-r--r--lib/export/html-vp-3.xsl265
-rw-r--r--lib/export/oscar.php40
-rw-r--r--lib/export/pdf-v-3.xsl422
-rw-r--r--lib/export/pdf-v-4.xsl401
-rw-r--r--lib/export/pdf-vp-1.xsl406
-rw-r--r--lib/export/pdf-vp-2.xsl504
-rw-r--r--lib/export/rtf-t-1.xsl85
-rw-r--r--lib/export/rtf-t-2.xsl73
-rw-r--r--lib/export/rtf-t-3.xsl79
-rw-r--r--lib/export/rtf-v-4.xsl231
-rw-r--r--lib/export/rtf-vp-1.xsl264
-rw-r--r--lib/export/rtf-vp-2.xsl195
-rw-r--r--lib/export/rtf-vp-3.xsl293
-rw-r--r--lib/export/txt-v-3.xsl151
-rw-r--r--lib/export/txt-vp-1.xsl202
-rw-r--r--lib/export/txt-vp-2.xsl194
40 files changed, 8906 insertions, 0 deletions
diff --git a/lib/export/csv-p-1.xsl b/lib/export/csv-p-1.xsl
new file mode 100644
index 0000000..7ca6d53
--- /dev/null
+++ b/lib/export/csv-p-1.xsl
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<!-- vosshe@fh-trier.de -->
+<xsl:output method="text" encoding="UTF-8" byte-order-mark="yes"/>
+
+<xsl:template match="/">
+ <xsl:text>&#xFEFF;</xsl:text>
+ <xsl:text>Typ;</xsl:text>
+ <xsl:text>Name;</xsl:text>
+ <xsl:text>Fakultaet;</xsl:text>
+ <xsl:text>Gruppe;</xsl:text>
+ <xsl:text>Titel;</xsl:text>
+ <xsl:text>Vorname;</xsl:text>
+ <xsl:text>Name;</xsl:text>
+ <xsl:text>Titel2;</xsl:text>
+ <xsl:text>Telefon;</xsl:text>
+ <xsl:text>Raum;</xsl:text>
+ <xsl:text>Sprechzeiten;</xsl:text>
+ <xsl:text>E-Mail</xsl:text>
+<xsl:text>
+</xsl:text>
+
+ <xsl:for-each select="studip">
+ <xsl:for-each select="institut">
+ <xsl:for-each select="personen">
+ <xsl:for-each select="gruppe">
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template name="showperson">
+ <xsl:for-each select="person">
+ <xsl:text>"</xsl:text>
+
+ <xsl:value-of select="../../../type" />
+ <xsl:text>";"</xsl:text>
+
+ <xsl:value-of select="../../../name" />
+ <xsl:text>";"</xsl:text>
+
+ <xsl:value-of select="../../../fakultaet" />
+ <xsl:text>";"</xsl:text>
+
+ <xsl:value-of select="../@key" />
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="titel">
+ <xsl:value-of select="titel"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="vorname">
+ <xsl:value-of select="vorname"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="nachname">
+ <xsl:value-of select="nachname"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="titel2">
+ <xsl:value-of select="titel2"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="telefon">
+ <xsl:value-of select="telefon"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="raum">
+ <xsl:value-of select="raum"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="sprechzeiten">
+ <xsl:value-of select="sprechzeiten"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="email">
+ <xsl:value-of select="email"/>
+ </xsl:if>
+ <xsl:text>"</xsl:text>
+
+<xsl:text>
+</xsl:text>
+
+ </xsl:for-each>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/lib/export/csv-p-2.xsl b/lib/export/csv-p-2.xsl
new file mode 100644
index 0000000..d344b3b
--- /dev/null
+++ b/lib/export/csv-p-2.xsl
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<!-- vosshe@fh-trier.de -->
+<xsl:output method="text" encoding="UTF-8"/>
+
+<xsl:template match="/">
+ <xsl:text>&#xFEFF;</xsl:text>
+ <xsl:text>Gruppe;</xsl:text>
+ <xsl:text>Titel;</xsl:text>
+ <xsl:text>Vorname;</xsl:text>
+ <xsl:text>Name;</xsl:text>
+ <xsl:text>Titel2;</xsl:text>
+ <xsl:text>Telefon;</xsl:text>
+ <xsl:text>E-Mail</xsl:text>
+<xsl:text>
+</xsl:text>
+
+ <xsl:for-each select="studip">
+ <xsl:for-each select="institut">
+ <xsl:for-each select="personen">
+ <xsl:for-each select="gruppe">
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template name="showperson">
+ <xsl:for-each select="person">
+ <xsl:text>"</xsl:text>
+
+ <xsl:value-of select="../@key" />
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="titel">
+ <xsl:value-of select="titel"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="vorname">
+ <xsl:value-of select="vorname"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="nachname">
+ <xsl:value-of select="nachname"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="titel2">
+ <xsl:value-of select="titel2"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="telefon">
+ <xsl:value-of select="telefon"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="email">
+ <xsl:value-of select="email"/>
+ </xsl:if>
+ <xsl:text>"</xsl:text>
+
+<xsl:text>
+</xsl:text>
+
+ </xsl:for-each>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/lib/export/csv-t-1.xsl b/lib/export/csv-t-1.xsl
new file mode 100644
index 0000000..557def6
--- /dev/null
+++ b/lib/export/csv-t-1.xsl
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ xmlns:func="http://exslt.org/functions"
+ xmlns:str="http://exslt.org/strings">
+
+ <xsl:output method="text" encoding="UTF-8"/>
+
+ <xsl:key name="datafields-by-key" match="//personen//datenfeld" use="@key"/>
+
+ <xsl:variable name="collect-datafields">
+ <xsl:for-each select="//datenfeld[generate-id(.) = generate-id(key('datafields-by-key', @key)[1])]">
+ <xsl:sort select="@key"/>
+ <entry><xsl:value-of select="@key"/></entry>
+ <!--xsl:message>Datenfeld: <xsl:value-of select="@key"/></xsl:message-->
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:variable name="datafields" select="exsl:node-set($collect-datafields)/entry"/>
+
+ <xsl:key name="zusatzangaben-by-key" match="//personen//zusatzangabe" use="@key"/>
+
+ <xsl:variable name="collect-zusatzangaben">
+ <xsl:for-each select="//zusatzangabe[generate-id(.) = generate-id(key('zusatzangaben-by-key', @key)[1])]">
+ <xsl:sort select="@key"/>
+ <!-- filter out identical entries in datafields and zusatzangaben -->
+ <xsl:variable name="key" select="@key"/>
+ <xsl:if test="not(//datenfeld[@key=$key])">
+ <entry><xsl:value-of select="@key"/></entry>
+ <!--xsl:message>Datenfeld: <xsl:value-of select="@key"/></xsl:message-->
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:variable name="zusatzangaben" select="exsl:node-set($collect-zusatzangaben)/entry"/>
+
+ <xsl:template match="/">
+ <xsl:text>&#xFEFF;</xsl:text>
+ <xsl:text>Anrede;</xsl:text>
+ <xsl:text>Titel;</xsl:text>
+ <xsl:text>Vorname;</xsl:text>
+ <xsl:text>Nachname;</xsl:text>
+ <xsl:text>Titel2;</xsl:text>
+ <xsl:text>Nutzernamen;</xsl:text>
+ <xsl:text>Privatadr;</xsl:text>
+ <xsl:text>Privatnr;</xsl:text>
+ <xsl:text>E-Mail;</xsl:text>
+ <xsl:text>Anmeldedatum;</xsl:text>
+ <xsl:text>Studiengänge;</xsl:text>
+ <xsl:if test="$datafields">
+ <xsl:for-each select="$datafields">
+ <xsl:text>"</xsl:text>
+ <xsl:value-of select="str:replace(.,'&quot;','&quot;&quot;')"/>
+ <xsl:text>";</xsl:text>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="$zusatzangaben">
+ <xsl:for-each select="$zusatzangaben">
+ <xsl:text>"</xsl:text>
+ <xsl:value-of select="str:replace(.,'&quot;','&quot;&quot;')"/>
+ <xsl:text>";</xsl:text>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:text>Bemerkung</xsl:text>
+ <xsl:text>
+</xsl:text>
+
+ <xsl:for-each select="studip">
+ <xsl:for-each select="institut">
+ <xsl:for-each select="personen">
+ <xsl:for-each select="gruppe">
+ <xsl:value-of select="@key"/>
+ <xsl:text>&#xa;</xsl:text>
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:for-each>
+
+ </xsl:template>
+
+ <xsl:template name="showperson">
+ <xsl:for-each select="person">
+ <xsl:text>"</xsl:text>
+
+ <xsl:if test="geschlecht = 1">Herr</xsl:if>
+ <xsl:if test="geschlecht = 2">Frau</xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="titel">
+ <xsl:value-of select="str:replace(titel,'&quot;','&quot;&quot;')"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="vorname">
+ <xsl:value-of select="vorname"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="nachname">
+ <xsl:value-of select="nachname"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="titel2">
+ <xsl:value-of select="str:replace(titel2,'&quot;','&quot;&quot;')"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="username">
+ <xsl:value-of select="username"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="adresse">
+ <xsl:value-of select="str:replace(adresse,'&quot;','&quot;&quot;')"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="privatnummer">
+ <xsl:value-of select="str:replace(privatnummer,'&quot;','&quot;&quot;')"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="email">
+ <xsl:value-of select="email"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="datum_anmeldung">
+ <xsl:value-of select="datum_anmeldung"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="nutzer_studiengaenge">
+ <xsl:value-of select="str:replace(nutzer_studiengaenge,'&quot;','&quot;&quot;')"/>
+ </xsl:if>
+
+ <xsl:text>";"</xsl:text>
+ <xsl:call-template name="check_datafields">
+ <xsl:with-param name="daten" select="datenfelder"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="check_zusatzangaben">
+ <xsl:with-param name="daten" select="zusatzangaben"/>
+ </xsl:call-template>
+
+ <xsl:if test="bemerkung">
+ <xsl:value-of select="bemerkung"/>
+ </xsl:if>
+ <xsl:text>"</xsl:text>
+
+ <xsl:text>
+</xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="check_datafields">
+ <xsl:param name="daten"/>
+ <xsl:if test="$datafields">
+ <xsl:for-each select="$datafields">
+ <xsl:call-template name="show_datafields">
+ <xsl:with-param name="daten" select="$daten"/>
+ <xsl:with-param name="datatitel" select="."/>
+ </xsl:call-template>
+ <xsl:text>";"</xsl:text>
+ </xsl:for-each>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="check_zusatzangaben">
+ <xsl:param name="daten"/>
+ <xsl:if test="$zusatzangaben">
+ <xsl:for-each select="$zusatzangaben">
+ <xsl:call-template name="show_zusatzangaben">
+ <xsl:with-param name="daten" select="$daten"/>
+ <xsl:with-param name="datatitel" select="."/>
+ </xsl:call-template>
+ <xsl:text>";"</xsl:text>
+ </xsl:for-each>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="show_datafields">
+ <xsl:param name="daten"/>
+ <xsl:param name="datatitel"/>
+ <xsl:value-of select="str:replace(normalize-space($daten/datenfeld[@key=$datatitel]),'&quot;','&quot;&quot;')"/>
+ </xsl:template>
+
+ <xsl:template name="show_zusatzangaben">
+ <xsl:param name="daten"/>
+ <xsl:param name="datatitel"/>
+ <xsl:value-of select="str:replace(normalize-space($daten/zusatzangabe[@key=$datatitel]),'&quot;','&quot;&quot;')"/>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/lib/export/csv-t-2.xsl b/lib/export/csv-t-2.xsl
new file mode 100644
index 0000000..53e2eb8
--- /dev/null
+++ b/lib/export/csv-t-2.xsl
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ xmlns:func="http://exslt.org/functions"
+ xmlns:str="http://exslt.org/strings">
+
+ <xsl:output method="text" encoding="UTF-8"/>
+
+ <xsl:key name="datafields-by-key" match="//personen//datenfeld" use="@key"/>
+
+ <xsl:variable name="collect-datafields">
+ <xsl:for-each select="//datenfeld[generate-id(.) = generate-id(key('datafields-by-key', @key)[1])]">
+ <xsl:sort select="@key"/>
+ <entry><xsl:value-of select="@key"/></entry>
+ <!--xsl:message>Datenfeld: <xsl:value-of select="@key"/></xsl:message-->
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:variable name="datafields" select="exsl:node-set($collect-datafields)/entry"/>
+
+ <xsl:key name="zusatzangaben-by-key" match="//personen//zusatzangabe" use="@key"/>
+
+ <xsl:variable name="collect-zusatzangaben">
+ <xsl:for-each select="//zusatzangabe[generate-id(.) = generate-id(key('zusatzangaben-by-key', @key)[1])]">
+ <xsl:sort select="@key"/>
+ <!-- filter out identical entries in datafields and zusatzangaben -->
+ <xsl:variable name="key" select="@key"/>
+ <xsl:if test="not(//datenfeld[@key=$key])">
+ <entry><xsl:value-of select="@key"/></entry>
+ <!--xsl:message>Datenfeld: <xsl:value-of select="@key"/></xsl:message-->
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:variable name="zusatzangaben" select="exsl:node-set($collect-zusatzangaben)/entry"/>
+
+ <xsl:template match="/">
+ <xsl:text>&#xFEFF;</xsl:text>
+ <xsl:text>Position;</xsl:text>
+ <xsl:text>Anrede;</xsl:text>
+ <xsl:text>Titel;</xsl:text>
+ <xsl:text>Vorname;</xsl:text>
+ <xsl:text>Nachname;</xsl:text>
+ <xsl:text>Titel2;</xsl:text>
+ <xsl:text>Nutzernamen;</xsl:text>
+ <xsl:text>Privatadr;</xsl:text>
+ <xsl:text>Privatnr;</xsl:text>
+ <xsl:text>E-Mail;</xsl:text>
+ <xsl:text>Studiengänge;</xsl:text>
+ <xsl:if test="$datafields">
+ <xsl:for-each select="$datafields">
+ <xsl:text>"</xsl:text>
+ <xsl:value-of select="str:replace(.,'&quot;','&quot;&quot;')"/>
+ <xsl:text>";</xsl:text>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="$zusatzangaben">
+ <xsl:for-each select="$zusatzangaben">
+ <xsl:text>"</xsl:text>
+ <xsl:value-of select="str:replace(.,'&quot;','&quot;&quot;')"/>
+ <xsl:text>";</xsl:text>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:text>Bemerkung</xsl:text>
+ <xsl:text>
+</xsl:text>
+
+ <xsl:for-each select="studip">
+ <xsl:for-each select="institut">
+ <xsl:for-each select="personen">
+ <xsl:for-each select="gruppe">
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:for-each>
+
+ </xsl:template>
+
+ <xsl:template name="showperson">
+ <xsl:for-each select="person">
+ <xsl:text>"</xsl:text>
+
+ <xsl:if test="position_warteliste">
+ <xsl:value-of select="position_warteliste"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="geschlecht = 1">Herr</xsl:if>
+ <xsl:if test="geschlecht = 2">Frau</xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="titel">
+ <xsl:value-of select="str:replace(titel,'&quot;','&quot;&quot;')"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="vorname">
+ <xsl:value-of select="vorname"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="nachname">
+ <xsl:value-of select="nachname"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="titel2">
+ <xsl:value-of select="str:replace(titel2,'&quot;','&quot;&quot;')"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="username">
+ <xsl:value-of select="username"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="adresse">
+ <xsl:value-of select="str:replace(adresse,'&quot;','&quot;&quot;')"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="privatnummer">
+ <xsl:value-of select="str:replace(privatnummer,'&quot;','&quot;&quot;')"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="email">
+ <xsl:value-of select="email"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="nutzer_studiengaenge">
+ <xsl:value-of select="str:replace(nutzer_studiengaenge,'&quot;','&quot;&quot;')"/>
+ </xsl:if>
+
+ <xsl:text>";"</xsl:text>
+ <xsl:call-template name="check_datafields">
+ <xsl:with-param name="daten" select="datenfelder"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="check_zusatzangaben">
+ <xsl:with-param name="daten" select="zusatzangaben"/>
+ </xsl:call-template>
+
+ <xsl:if test="bemerkung">
+ <xsl:value-of select="bemerkung"/>
+ </xsl:if>
+ <xsl:text>"</xsl:text>
+
+ <xsl:text>
+</xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="check_datafields">
+ <xsl:param name="daten"/>
+ <xsl:if test="$datafields">
+ <xsl:for-each select="$datafields">
+ <xsl:call-template name="show_datafields">
+ <xsl:with-param name="daten" select="$daten"/>
+ <xsl:with-param name="datatitel" select="."/>
+ </xsl:call-template>
+ <xsl:text>";"</xsl:text>
+ </xsl:for-each>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="check_zusatzangaben">
+ <xsl:param name="daten"/>
+ <xsl:if test="$zusatzangaben">
+ <xsl:for-each select="$zusatzangaben">
+ <xsl:call-template name="show_zusatzangaben">
+ <xsl:with-param name="daten" select="$daten"/>
+ <xsl:with-param name="datatitel" select="."/>
+ </xsl:call-template>
+ <xsl:text>";"</xsl:text>
+ </xsl:for-each>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="show_datafields">
+ <xsl:param name="daten"/>
+ <xsl:param name="datatitel"/>
+ <xsl:value-of select="str:replace(normalize-space($daten/datenfeld[@key=$datatitel]),'&quot;','&quot;&quot;')"/>
+ </xsl:template>
+
+ <xsl:template name="show_zusatzangaben">
+ <xsl:param name="daten"/>
+ <xsl:param name="datatitel"/>
+ <xsl:value-of select="str:replace(normalize-space($daten/zusatzangabe[@key=$datatitel]),'&quot;','&quot;&quot;')"/>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/lib/export/csv-t-3.xsl b/lib/export/csv-t-3.xsl
new file mode 100644
index 0000000..7ae2f49
--- /dev/null
+++ b/lib/export/csv-t-3.xsl
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ xmlns:func="http://exslt.org/functions"
+ xmlns:str="http://exslt.org/strings">
+
+ <xsl:output method="text" encoding="UTF-8"/>
+
+ <xsl:key name="datafields-by-key" match="//personen//datenfeld" use="@key"/>
+
+ <xsl:variable name="collect-datafields">
+ <xsl:for-each select="//datenfeld[generate-id(.) = generate-id(key('datafields-by-key', @key)[1])]">
+ <xsl:sort select="@key"/>
+ <entry><xsl:value-of select="@key"/></entry>
+ <!--xsl:message>Datenfeld: <xsl:value-of select="@key"/></xsl:message-->
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:variable name="datafields" select="exsl:node-set($collect-datafields)/entry"/>
+
+ <xsl:key name="zusatzangaben-by-key" match="//personen//zusatzangabe" use="@key"/>
+
+ <xsl:variable name="collect-zusatzangaben">
+ <xsl:for-each select="//zusatzangabe[generate-id(.) = generate-id(key('zusatzangaben-by-key', @key)[1])]">
+ <xsl:sort select="@key"/>
+ <!-- filter out identical entries in datafields and zusatzangaben -->
+ <xsl:variable name="key" select="@key"/>
+ <xsl:if test="not(//datenfeld[@key=$key])">
+ <entry><xsl:value-of select="@key"/></entry>
+ <!--xsl:message>Datenfeld: <xsl:value-of select="@key"/></xsl:message-->
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:variable name="zusatzangaben" select="exsl:node-set($collect-zusatzangaben)/entry"/>
+
+ <xsl:template match="/">
+ <xsl:text>&#xFEFF;</xsl:text>
+ <xsl:text>Gruppe;</xsl:text>
+ <xsl:text>Titel;</xsl:text>
+ <xsl:text>Vorname;</xsl:text>
+ <xsl:text>Nachname;</xsl:text>
+ <xsl:text>Titel2;</xsl:text>
+ <xsl:text>Nutzernamen;</xsl:text>
+ <xsl:text>Privatadr;</xsl:text>
+ <xsl:text>Privatnr;</xsl:text>
+ <xsl:text>E-Mail;</xsl:text>
+ <xsl:text>Anmeldedatum;</xsl:text>
+ <xsl:text>Studiengänge;</xsl:text>
+ <xsl:if test="$datafields">
+ <xsl:for-each select="$datafields">
+ <xsl:text>"</xsl:text>
+ <xsl:value-of select="str:replace(.,'&quot;','&quot;&quot;')"/>
+ <xsl:text>";</xsl:text>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="$zusatzangaben">
+ <xsl:for-each select="$zusatzangaben">
+ <xsl:text>"</xsl:text>
+ <xsl:value-of select="str:replace(.,'&quot;','&quot;&quot;')"/>
+ <xsl:text>";</xsl:text>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:text>
+</xsl:text>
+
+ <xsl:for-each select="studip">
+ <xsl:for-each select="institut">
+ <xsl:for-each select="personen">
+ <xsl:for-each select="gruppe">
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:for-each>
+
+ </xsl:template>
+
+ <xsl:template name="showperson">
+ <xsl:variable name="namegruppe" select="@key"/>
+ <xsl:for-each select="person">
+ <xsl:text>"</xsl:text>
+ <xsl:value-of select="str:replace($namegruppe, '&quot;','&quot;&quot;')"/>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="titel">
+ <xsl:value-of select="str:replace(titel,'&quot;','&quot;&quot;')"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="vorname">
+ <xsl:value-of select="vorname"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="nachname">
+ <xsl:value-of select="nachname"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="titel2">
+ <xsl:value-of select="str:replace(titel2,'&quot;','&quot;&quot;')"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="username">
+ <xsl:value-of select="username"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="adresse">
+ <xsl:value-of select="str:replace(adresse,'&quot;','&quot;&quot;')"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="privatnummer">
+ <xsl:value-of select="str:replace(privatnummer,'&quot;','&quot;&quot;')"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="email">
+ <xsl:value-of select="email"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="datum_anmeldung">
+ <xsl:value-of select="datum_anmeldung"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="nutzer_studiengaenge">
+ <xsl:value-of select="str:replace(nutzer_studiengaenge,'&quot;','&quot;&quot;')"/>
+ </xsl:if>
+
+ <xsl:text>";"</xsl:text>
+ <xsl:call-template name="check_datafields">
+ <xsl:with-param name="daten" select="datenfelder"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="check_zusatzangaben">
+ <xsl:with-param name="daten" select="zusatzangaben"/>
+ </xsl:call-template>
+
+ <xsl:text>"</xsl:text>
+
+ <xsl:text>
+</xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="check_datafields">
+ <xsl:param name="daten"/>
+ <xsl:if test="$datafields">
+ <xsl:for-each select="$datafields">
+ <xsl:call-template name="show_datafields">
+ <xsl:with-param name="daten" select="$daten"/>
+ <xsl:with-param name="datatitel" select="."/>
+ </xsl:call-template>
+ <xsl:text>";"</xsl:text>
+ </xsl:for-each>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="check_zusatzangaben">
+ <xsl:param name="daten"/>
+ <xsl:if test="$zusatzangaben">
+ <xsl:for-each select="$zusatzangaben">
+ <xsl:call-template name="show_zusatzangaben">
+ <xsl:with-param name="daten" select="$daten"/>
+ <xsl:with-param name="datatitel" select="."/>
+ </xsl:call-template>
+ <xsl:text>";"</xsl:text>
+ </xsl:for-each>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="show_datafields">
+ <xsl:param name="daten"/>
+ <xsl:param name="datatitel"/>
+ <xsl:value-of select="str:replace(normalize-space($daten/datenfeld[@key=$datatitel]),'&quot;','&quot;&quot;')"/>
+ </xsl:template>
+
+ <xsl:template name="show_zusatzangaben">
+ <xsl:param name="daten"/>
+ <xsl:param name="datatitel"/>
+ <xsl:value-of select="str:replace(normalize-space($daten/zusatzangabe[@key=$datatitel]),'&quot;','&quot;&quot;')"/>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/lib/export/csv-v-1.xsl b/lib/export/csv-v-1.xsl
new file mode 100644
index 0000000..d14f87c
--- /dev/null
+++ b/lib/export/csv-v-1.xsl
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<!-- vosshe@fh-trier.de -->
+<xsl:output method="text" encoding="UTF-8"/>
+ <xsl:template match="/">
+ <xsl:text>&#xFEFF;</xsl:text>
+ <xsl:text>Einrichtung-Typ;</xsl:text>
+ <xsl:text>Einrichtung-Name;</xsl:text>
+ <xsl:text>Einrichtung-Fakultaet;</xsl:text>
+ <xsl:text>Typ;</xsl:text>
+ <xsl:text>Lehrende;</xsl:text>
+ <xsl:text>Titel;</xsl:text>
+ <xsl:text>Untertitel;</xsl:text>
+ <xsl:text>Raum;</xsl:text>
+ <xsl:text>Art;</xsl:text>
+ <xsl:text>max. Teilnehmende;</xsl:text>
+ <xsl:text>ECTS;</xsl:text>
+ <xsl:text>Vorbesprechung;</xsl:text>
+ <xsl:text>erster Termin;</xsl:text>
+ <xsl:text>Termin;</xsl:text>
+ <xsl:text>Lernorganisation;</xsl:text>
+ <xsl:text>sonstiges</xsl:text>
+<xsl:text>
+</xsl:text>
+
+ <xsl:for-each select="studip">
+ <xsl:for-each select="institut">
+ <xsl:for-each select="seminare">
+ <xsl:for-each select="gruppe">
+ <xsl:call-template name="showseminar" />
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:for-each>
+
+</xsl:template>
+
+<xsl:template name="showseminar">
+ <xsl:for-each select="seminar">
+ <xsl:text>"</xsl:text>
+
+ <xsl:value-of select="../../../type" />
+ <xsl:text>";"</xsl:text>
+
+ <xsl:value-of select="../../../name" />
+ <xsl:text>";"</xsl:text>
+
+ <xsl:value-of select="../../../fakultaet" />
+ <xsl:text>";"</xsl:text>
+
+ <xsl:value-of select="../@key" />
+ <xsl:text>";"</xsl:text>
+
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:value-of select="titel"/>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="untertitel">
+ <xsl:value-of select="untertitel"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="raum">
+ <xsl:value-of select="raum"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="art">
+ <xsl:value-of select="art"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="teilnehmerzahl">
+ <xsl:value-of select="normalize-space(teilnehmerzahl)"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="ects">
+ <xsl:value-of select="ects"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="termine/vorbesprechung">
+ <xsl:value-of select="termine/vorbesprechung"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="termine/erstertermin">
+ <xsl:value-of select="termine/erstertermin"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="termine/termin">
+ <xsl:value-of select="termine/termin"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="lernorga">
+ <xsl:value-of select="lernorga"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="sonstiges">
+ <xsl:value-of select="sonstiges"/>
+ </xsl:if>
+ <xsl:text>"</xsl:text>
+
+ <xsl:text>
+</xsl:text>
+ </xsl:for-each>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/lib/export/csv-v-2.xsl b/lib/export/csv-v-2.xsl
new file mode 100644
index 0000000..d993881
--- /dev/null
+++ b/lib/export/csv-v-2.xsl
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<!-- vosshe@fh-trier.de -->
+<xsl:output method="text" encoding="UTF-8"/>
+ <xsl:template match="/">
+ <xsl:text>&#xFEFF;</xsl:text>
+ <xsl:text>Typ;</xsl:text>
+ <xsl:text>Lehrende;</xsl:text>
+ <xsl:text>Titel;</xsl:text>
+ <xsl:text>max. Teilnehmende;</xsl:text>
+ <xsl:text>ECTS;</xsl:text>
+ <xsl:text>Termin</xsl:text>
+<xsl:text>
+</xsl:text>
+
+ <xsl:for-each select="studip">
+ <xsl:for-each select="institut">
+ <xsl:for-each select="seminare">
+ <xsl:for-each select="gruppe">
+ <xsl:call-template name="showseminar" />
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:for-each>
+
+</xsl:template>
+
+<xsl:template name="showseminar">
+ <xsl:for-each select="seminar">
+ <xsl:text>"</xsl:text>
+
+ <xsl:value-of select="../@key" />
+ <xsl:text>";"</xsl:text>
+
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:value-of select="titel"/>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="teilnehmerzahl">
+ <xsl:value-of select="normalize-space(teilnehmerzahl)"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="ects">
+ <xsl:value-of select="ects"/>
+ </xsl:if>
+ <xsl:text>";"</xsl:text>
+
+ <xsl:if test="termine/termin">
+ <xsl:value-of select="termine/termin"/>
+ </xsl:if>
+ <xsl:text>"</xsl:text>
+
+ <xsl:text>
+</xsl:text>
+ </xsl:for-each>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/lib/export/export_choose_xslt.inc.php b/lib/export/export_choose_xslt.inc.php
new file mode 100644
index 0000000..cbf152e
--- /dev/null
+++ b/lib/export/export_choose_xslt.inc.php
@@ -0,0 +1,243 @@
+<?
+# Lifter002: TODO
+# Lifter007: TODO
+# Lifter003: TODO
+# Lifter010: TODO
+/**
+ * Export-subfile. Choses which XSL-Script to use.
+ *
+ * In this file there are several forms which help choosing the proper XSL-Script
+ * to transform the export-data into a specific file-format.
+ *
+ * @author Arne Schroeder <schroeder@data.quest.de>
+ * @access public
+ * @modulegroup export_modules
+ * @module export_choose_xslt
+ * @package Export
+ */
+// +---------------------------------------------------------------------------+
+// This file is part of Stud.IP
+// export_choose_xslt.inc.php
+// pages for choosing an xslt-script
+//
+// Copyright (c) 2002 Arne Schroeder <schroeder@data-quest.de>
+// Suchi & Berg GmbH <info@data-quest.de>
+// +---------------------------------------------------------------------------+
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or any later version.
+// +---------------------------------------------------------------------------+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// +---------------------------------------------------------------------------+
+
+use Studip\Button, Studip\LinkButton;
+
+$perm->check('tutor');
+
+require_once 'lib/export/export_xslt_vars.inc.php'; // Liste der XSLT-Skripts
+require_once 'lib/dates.inc.php'; // Datumsfunktionen
+
+/**
+ * Checks given parameters
+ *
+ * This function checks the given parameters. If some are missing or refer to a XSL-file that
+ * doesn't exist it returns false and adds a warning to export_error.
+ *
+ * @access public
+ * @return boolean
+ */
+function CheckParamXSLT()
+{
+ global $ex_type, $xml_file_id, $page, $o_mode, $format, $choose, $xslt_files, $export_o_modes, $export_ex_types, $export_error, $export_error_num;
+ $mod_counter = 0;
+ $page = (int)$page;
+ if ($page === 1) {
+ reset($xslt_files);
+ foreach ($xslt_files as $val) {
+ if ($val[$ex_type] && $val[$format]) {
+ $mod_counter++;
+ }
+ }
+ if ($mod_counter === 0 && $format !== "xml") {
+ $export_error .= _("Für dieses Format sind keine Ausgabemodule installiert.<br>Bitte wählen Sie ein anderes Ausgabeformat.") . "<br>";
+ $page = 0;
+ }
+
+ if (!$format) {
+ $page = 0;
+ }
+ reset($xslt_files);
+ }
+
+ if ($page === 2 && !$choose) {
+ $page = 1;
+ }
+ if ( /*($xml_file_id != "") AND */ (in_array($ex_type, $export_ex_types)) && (in_array($o_mode, $export_o_modes))) {
+ return true;
+ }
+
+ $export_error .= "<b>" . _("Unzulässiger Seitenaufruf!") . "</b><br>";
+ $export_error_num++;
+ return false;
+}
+
+$export_pagename = _("Konvertierung der Daten: ");
+$xslt_filename = mb_strlen(Request::get('xslt_filename')) ? basename(stripslashes(Request::get('xslt_filename'))) : $xslt_filename_default;
+
+if (!CheckParamXSLT()) {
+ $export_pagename .= _('Es ist ein Fehler aufgetreten.');
+ $export_pagecontent .= MessageBox::error(
+ _('Die Parameter, mit denen diese Seite aufgerufen wurde, sind fehlerhaft oder unvollständig.')
+ );
+}
+
+// Die Seiten 2 und 3 ueberspringen, wenn als Dateiformat XML gewaehlt wurde
+if ($format === "xml" && $page === 1) {
+ $xml_file_id = "";
+ $o_mode = "file";
+ $page = 3;
+// Seite 1 : Auswahl des Dateiformats
+} elseif (!isset($page) || $page === 0) {
+ $export_pagename .= _("Auswahl des Dateiformats");
+
+ unset($export_msg);
+ unset($xml_printimage);
+ unset($xml_printlink);
+ unset($xml_printdesc);
+ unset($xml_printcontent);
+
+ $export_info = null;
+
+ $export_pagecontent .= "<form class=\"default\" method=\"POST\" action=\"" . URLHelper::getLink() . "\">";
+ $export_pagecontent .= "<fieldset><legend>" . _("Bitte wählen Sie, in welchem Format die Daten ausgegeben werden sollen!") . "</legend>";
+
+ $export_pagecontent .= CSRFProtection::tokenTag();
+ $export_pagecontent .= "<label>" . _("Ausgabeformat:") . "<select name=\"format\">";
+
+ foreach ($output_formats as $key => $val) {
+ $export_pagecontent .= "<option value=\"" . $key . "\"";
+ if ($format == $key) {
+ $export_pagecontent .= " selected";
+ }
+ $export_pagecontent .= ">" . $val;
+ }
+ $export_pagecontent .= "</select></label>";
+ $export_pagecontent .= "<label>" . _("Name der Datei (z.B. &raquo;Test&laquo;):");
+ $export_pagecontent .= "<input type=\"text\" name=\"xslt_filename\" value=\"" . htmlReady($xslt_filename) . "\">";
+ $export_pagecontent .= "</label>";
+ $export_pagecontent .= "<input type=\"hidden\" name=\"page\" value=\"1\">";
+ $export_pagecontent .= "<input type=\"hidden\" name=\"o_mode\" value=\"" . htmlReady($o_mode) . "\">";
+ $export_pagecontent .= "<input type=\"hidden\" name=\"range_id\" value=\"" . htmlReady($range_id) . "\">";
+ $export_pagecontent .= "<input type=\"hidden\" name=\"ex_sem\" value=\"" . htmlReady($ex_sem) . "\">";
+ foreach (array_keys($ex_sem_class) as $semclassid) {
+ $export_pagecontent .= "<input type=\"hidden\" name=\"ex_sem_class[" . htmlReady($semclassid) . "]\" value=\"1\">";
+ }
+ $export_pagecontent .= "<input type=\"hidden\" name=\"ex_type\" value=\"" . htmlReady($ex_type) . "\">";
+ $export_pagecontent .= "<input type=\"hidden\" name=\"choose\" value=\"" . htmlReady($choose) . "\">";
+ $export_pagecontent .= "<input type=\"hidden\" name=\"xml_file_id\" value=\"" . htmlReady($xml_file_id) . "\">";
+
+ $export_pagecontent .= "</fieldset>";
+ $export_weiter_button = '<footer>' . Button::create('<< ' . _('Zurück'), 'back');
+ $export_weiter_button .= Button::create(_('Weiter') . ' >>', 'next') . "</div>";
+
+ $export_weiter_button .= "</footer></form>";
+// Seite 2 : Auswahl des XSLT-Scripts
+} elseif ($page === 1) {
+ if (mb_strpos($choose, $format) === false) {
+ unset($choose);
+ }
+ $export_pagename .= _("Auswahl des Ausgabemoduls");
+ $export_info = null;
+ $export_pagecontent .= '<form class="default" method="POST" action="' . URLHelper::getLink() . '">';
+ $export_pagecontent .= '<fieldset><legend>' . _('Ausgabemodul') . '</legend>';
+ $export_pagecontent .= CSRFProtection::tokenTag();
+ $export_pagecontent .= "";
+
+ $opt_num = 0;
+ foreach ($xslt_files as $key => $val) {
+ if ($val[$ex_type] && $val[$format]) {
+ $export_pagecontent .= "<label><input type=\"radio\" name=\"choose\" value=\"" . $key . "\"";
+ if ($key == $choose || !$choose && $opt_num == 0) {
+ $export_pagecontent .= " checked";
+ }
+ $export_pagecontent .= ">" . $val["name"];
+ $export_pagecontent .= tooltipIcon($val["desc"]);
+ $export_pagecontent .= "</label>";
+ $opt_num++;
+ }
+ }
+
+ $export_pagecontent .= '</fieldset>';
+ $export_pagecontent .= '<input type="hidden" name="page" value="2">';
+ $export_pagecontent .= '<input type="hidden" name="format" value="' . htmlReady($format) . '">';
+ $export_pagecontent .= '<input type="hidden" name="o_mode" value="' . htmlReady($o_mode) . '">';
+ $export_pagecontent .= '<input type="hidden" name="ex_type" value="' . htmlReady($ex_type) . '">';
+ $export_pagecontent .= '<input type="hidden" name="ex_sem" value="' . htmlReady($ex_sem) . '">';
+ foreach (array_keys($ex_sem_class) as $semclassid) {
+ $export_pagecontent .= '<input type="hidden" name="ex_sem_class[' . htmlReady($semclassid) . ']" value="1">';
+ }
+ $export_pagecontent .= '<input type="hidden" name="range_id" value="' . htmlReady($range_id) . '">';
+ $export_pagecontent .= '<input type="hidden" name="xml_file_id" value="' . htmlReady($xml_file_id) . '">';
+ $export_pagecontent .= '<input type="hidden" name="xslt_filename" value="' . htmlReady($xslt_filename) . '">';
+
+ $export_weiter_button = '<footer>' . Button::create('<< ' . _('Zurück'), 'back');
+
+ $export_weiter_button .= Button::create(_('Weiter') . ' >>', 'next');
+ $export_weiter_button .= '</footer></form>';
+// Seite 3 : Download der Dateien
+} elseif ($page === 2) {
+ $export_pagename .= _("Download der Dateien");
+ $export_info = _("Die benötigten Dateien liegen nun zum Download bereit.");
+ $export_pagecontent .= "<form class=\"default\" method=\"post\" action=\"" . URLHelper::getLink() . "\">";
+ $export_pagecontent .= CSRFProtection::tokenTag();
+
+ $xml_printimage = '<a href="' . FileManager::getDownloadLinkForTemporaryFile($xml_file_id, $xml_filename) . '">';
+ $xml_printimage .= Icon::create($export_icon['xml'])->asImg(['class' => 'text-top']);
+ $xml_printimage .= '</a>';
+ $xml_printlink = '<a href="' . FileManager::getDownloadLinkForTemporaryFile($xml_file_id, $xml_filename) . '">' . htmlReady($xml_filename) . '</a>';
+ $xml_printdesc = _("XML-Daten");
+ $xml_printcontent = _("In dieser Datei sind die Daten als XML-Tags gespeichert. Diese Tags können mit einem XSLT-Script verarbeitet werden.") . "<br>";
+
+ $xslt_printimage = '<a href="' . FileManager::getDownloadLinkForTemporaryFile($xslt_files[$choose]['file'], $xslt_files[$choose]['name'] . '.xsl') . '">';
+ $xslt_printimage .= Icon::create($export_icon['xslt'])->asImg(['class' => 'text-top']);
+ $xslt_printimage .= '</a>';
+ $xslt_printlink = '<a href="' . FileManager::getDownloadLinkForTemporaryFile($xslt_files[$choose]['file'], $xslt_files[$choose]['name'] . '.xsl') . '">' . $xslt_files[$choose]['name'] . '.xsl</a>';
+ $xslt_printdesc = _("XSLT-Datei");
+ $xslt_printcontent = _("Dies ist das XSLT-Script zur Konvertierung der Daten. Klicken Sie auf den Dateinamen, um die Datei zu öffnen.") . "<br>";
+
+ $export_pagecontent .= "";
+ $export_pagecontent .= "<input type=\"hidden\" name=\"page\" value=\"3\">";
+ $export_pagecontent .= "<input type=\"hidden\" name=\"choose\" value=\"" . htmlReady($choose) . "\">";
+ $export_pagecontent .= "<input type=\"hidden\" name=\"format\" value=\"" . htmlReady($format) . "\">";
+ $export_pagecontent .= "<input type=\"hidden\" name=\"o_mode\" value=\"" . htmlReady($o_mode) . "\">";
+ $export_pagecontent .= "<input type=\"hidden\" name=\"ex_type\" value=\"" . htmlReady($ex_type) . "\">";
+ $export_pagecontent .= "<input type=\"hidden\" name=\"ex_sem\" value=\"" . htmlReady($ex_sem) . "\">";
+ foreach (array_keys($ex_sem_class) as $semclassid) {
+ $export_pagecontent .= "<input type=\"hidden\" name=\"ex_sem_class[" . htmlReady($semclassid) . "]\" value=\"1\">";
+ }
+ $export_pagecontent .= "<input type=\"hidden\" name=\"range_id\" value=\"" . htmlReady($range_id) . "\">";
+ $export_pagecontent .= "<input type=\"hidden\" name=\"xml_file_id\" value=\"" . htmlReady($xml_file_id) . "\">";
+ $export_pagecontent .= "<input type=\"hidden\" name=\"xslt_filename\" value=\"" . htmlReady($xslt_filename) . "\">";
+
+ $export_weiter_button = "<footer>" . Button::create('<< ' . _('Zurück'), 'back');
+ if (Config::get()->XSLT_ENABLE) {
+ $export_pagecontent .= _("Um die Daten mit dem installierten XSLT-Prozessor in das gewünschte Format zu bringen, klicken Sie bitte auf 'weiter'") . "<br><br>";
+ $export_weiter_button .= LinkButton::create(_('Weiter') . ' >>', '#', ['name' => 'next']);
+ } else {
+ $export_pagecontent .= "<br><br><br>";
+ }
+
+ $export_weiter_button .= "</footer></form>";
+
+ $export_pagecontent .= MessageBox::info(sprintf(
+ _('Diese Seite bereitet die Datenausgabe vor. %s Schritt 3/3 %s'),
+ '<br><i>', '</i>'
+ ));
+}
diff --git a/lib/export/export_config.inc.php b/lib/export/export_config.inc.php
new file mode 100644
index 0000000..d4c57ce
--- /dev/null
+++ b/lib/export/export_config.inc.php
@@ -0,0 +1,42 @@
+<?php
+// <<-- EXPORT-SETTINGS
+global $export_o_modes,
+ $export_ex_types,
+ $export_ex_types,
+ $skip_page_3,
+ $xml_filename,
+ $xslt_filename_default,
+ $output_formats,
+ $export_icon;
+// Export modes
+$export_o_modes = ["start","file","choose", "direct","processor","passthrough"];
+// Exportable output-types
+$export_ex_types = ["veranstaltung", "person", "forschung"];
+
+$skip_page_3 = true;
+// name of generated XML-file
+$xml_filename = "data.xml";
+// name of generated output-file
+$xslt_filename_default = "studip";
+
+// existing output formats
+$output_formats = [
+ "html" => "Hypertext Markup Language (HTML)",
+ "rtf" => "Rich Text Format (RTF)",
+ "txt" => "Text (TXT)",
+ "csv" => "Comma Separated Values (Excel)",
+ "fo" => "Adobe Postscript (PDF)",
+ "xml" => "Extensible Markup Language (XML)"
+];
+
+// Icons für die Ausgabeformate
+$export_icon["xml"] = "file-generic";
+$export_icon["xslt"] = "file-office";
+$export_icon["xsl"] = "file-office";
+$export_icon["rtf"] = "file-text";
+$export_icon["fo"] = "file-pdf";
+$export_icon["pdf"] = "file-pdf";
+$export_icon["html"] = "file-text";
+$export_icon["htm"] = "file-text";
+$export_icon["txt"] = "file-text";
+$export_icon["csv"] = "file-office";
diff --git a/lib/export/export_linking_func.inc.php b/lib/export/export_linking_func.inc.php
new file mode 100644
index 0000000..52ea828
--- /dev/null
+++ b/lib/export/export_linking_func.inc.php
@@ -0,0 +1,222 @@
+<?
+# Lifter002: TODO
+# Lifter007: TODO
+# Lifter003: TODO
+# Lifter010: TODO
+/**
+* Export-functions to create links to the export-module.
+*
+* In this file there are three functions which help to include the export-module into Stud.IP-pages.
+*
+* @author Arne Schroeder <schroeder@data.quest.de>
+* @access public
+* @modulegroup export_modules
+* @module export_linking_functions
+* @package Export
+*/
+require_once 'lib/export/export_config.inc.php';
+
+use Studip\Button, Studip\LinkButton;
+
+/**
+* Generates a form that can be put into Stud.IP-pages to link to the export-module.
+*
+* This function returns a string with a HTML-form that links to the export-module.
+* It passes the given parameters in order to allow to jump to a specific part of the export-module.
+*
+* @access public
+* @param string $range_id export-range
+* @param string $ex_type type of data to be exported
+* @param string $filename filename for data-file
+* @param string $format file-format for export
+* @param string $filter grouping-category for export
+* @return string
+*/
+function export_form($range_id, $ex_type = "", $filename = "", $format = "", $filter = "")
+{
+ global $output_formats, $xslt_filename;
+ $filename = $xslt_filename;
+ require_once ("lib/export/export_xslt_vars.inc.php");
+ $export_string = "<form action=\"" . "export.php\" method=\"post\">";
+ $export_string .= CSRFProtection::tokenTag();
+ $export_string .= "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tr><td class=\"table_row_even\"> &nbsp; &nbsp; &nbsp; ";
+
+ $export_string .= "<b> "._("Diese Daten exportieren: ") . "</b>";
+ $export_string .= "</td><td align=\"center\" class=\"table_row_even\">";
+ $export_string .= "<select name=\"format\">";
+ foreach ($output_formats as $key => $val)
+ {
+ $export_string .= "<option value=\"" . $key . "\"";
+ if ($format==$key) {
+ $export_string .= " selected";
+ }
+ $export_string .= ">" . $val;
+ }
+ $export_string .= "</select>";
+
+ $export_string .= "</td><td align=\"right\" class=\"table_row_even\">";
+ $export_string .= Button::create(_('Export'), 'export', ['title' => _('Diese Daten exportieren')]);
+
+ $export_string .= "<input type=\"hidden\" name=\"range_id\" value=\"$range_id\">";
+ $export_string .= "<input type=\"hidden\" name=\"o_mode\" value=\"choose\">";
+ $export_string .= "<input type=\"hidden\" name=\"page\" value=\"1\">";
+ $export_string .= "<input type=\"hidden\" name=\"ex_type\" value=\"$ex_type\">";
+ $export_string .= "<input type=\"hidden\" name=\"filter\" value=\"$filter\">";
+ $export_string .= "<input type=\"hidden\" name=\"xslt_filename\" value=\"$filename\">";
+ $export_string .= "</td></tr></table>";
+ $export_string .= "</form>";
+ return $export_string;
+}
+
+/**
+* Generates a form that can be put into the sidebar to link to the export-module.
+*
+* This function returns a string with a HTML-form that links to the export-module.
+* It passes the given parameters in order to allow to jump to a specific part of the export-module.
+*
+* @access public
+* @param string $range_id export-range
+* @param string $ex_type type of data to be exported
+* @param string $filename filename for data-file
+* @param string $format file-format for export
+* @param string $filter grouping-category for export
+* @return string
+*/
+function export_form_sidebar($range_id, $ex_type = "", $filename = "", $format = "", $filter = "")
+{
+ global $output_formats, $xslt_filename;
+ $filename = $xslt_filename;
+ require_once ("lib/export/export_xslt_vars.inc.php");
+ $export_string .= "<form class=\"default\" action=\"" . URLHelper::getLink('export.php') . "\" method=\"post\">";
+ $export_string .= CSRFProtection::tokenTag();
+ $export_string .= "<select name=\"format\">";
+ foreach ($output_formats as $key => $val)
+ {
+ $export_string .= "<option value=\"" . htmlReady($key) . "\"";
+ if ($format==$key) {
+ $export_string .= " selected";
+ }
+ $export_string .= ">" . htmlReady(my_substr($val, 0, 20)) . "</option>";
+ }
+ $export_string .= "</select>";
+
+ $export_string .= Button::create(_('Export'), 'export', ['title' => _('Daten Exportieren')]);
+ $export_string .= "<input type=\"hidden\" name=\"range_id\" value=\"" . htmlReady($range_id) . "\">";
+ $export_string .= "<input type=\"hidden\" name=\"o_mode\" value=\"choose\">";
+ $export_string .= "<input type=\"hidden\" name=\"page\" value=\"1\">";
+ $export_string .= "<input type=\"hidden\" name=\"ex_type\" value=\"" . htmlReady($ex_type) . "\">";
+ $export_string .= "<input type=\"hidden\" name=\"filter\" value=\"" . htmlReady($filter) . "\">";
+ $export_string .= "<input type=\"hidden\" name=\"xslt_filename\" value=\"" . htmlReady($filename) . "\">";
+ $export_string .= "</form>";
+ return $export_string;
+}
+
+/**
+* Generates a link to the export-module that can be put into Stud.IP-pages.
+*
+* This function returns a string with a link to the export-module.
+* It passes the given parameters in order to allow to jump to a specific part of the export-module.
+*
+* @access public
+* @param string $range_id export-range
+* @param string $ex_type type of data to be exported
+* @param string $filename filename for data-file
+* @param string $format file-format for export
+* @param string $choose xslt-Script for transformation
+* @param string $filter grouping-category for export
+* @return string
+*/
+function export_link($range_id, $ex_type = "", $filename = "", $format = "", $choose = "", $filter = "", $content = "", $o_mode = 'processor')
+{
+ global $i_page;
+
+ $export_string = '<a href="';
+ if ($choose != "") {
+ $export_string .= URLHelper::getLink(
+ 'export.php',
+ [
+ 'range_id' => $range_id,
+ 'ex_type' => $ex_type,
+ 'xslt_filename' => $filename,
+ 'format' => $format,
+ 'choose' => $choose,
+ 'o_mode' => $o_mode,
+ 'filter' => $filter,
+ 'jump' => $i_page
+ ]
+ );
+ }
+ elseif ($ex_type != "") {
+ $export_string .= URLHelper::getLink(
+ 'export.php',
+ [
+ 'range_id' => $range_id,
+ 'ex_type' => $ex_type,
+ 'xslt_filename' => $filename,
+ 'o_mode' => 'choose',
+ 'filter' => $filter
+ ]
+ );
+ }
+ else {
+ $export_string .= URLHelper::getLink(
+ 'export.php',
+ [
+ 'range_id' => $range_id,
+ 'o_mode' => 'start'
+ ]
+ );
+ }
+
+ $export_string .= '">' . ($content ? $content : _("Diese Daten exportieren"));
+ $export_string .= '</a>';
+ return $export_string;
+}
+
+/**
+* Generates a Button with a link to the export-module that can be put into Stud.IP-pages.
+*
+* This function returns a string containing an export-button with a link to the export-module.
+* It passes the given parameters in order to allow to jump to a specific part of the export-module.
+*
+* @access public
+* @param string $range_id export-range
+* @param string $ex_type type of data to be exported
+* @param string $filename filename for data-file
+* @param string $format file-format for export
+* @param string $choose xslt-Script for transformation
+* @param string $filter grouping-category for export
+* @return string
+*/
+function export_button($range_id, $ex_type = "", $filename = "", $format = "", $choose = "", $filter = "")
+{
+ global $i_page;
+ if ($choose != "") {
+ $parameters = [
+ 'range_id' => $range_id,
+ 'ex_type' => $ex_type,
+ 'xslt_filename' => $filename,
+ 'format' => $format,
+ 'choose' => $choose,
+ 'o_mode' => 'processor',
+ 'filter' => $filter,
+ 'jump' => $i_page
+ ];
+ }
+ elseif ($ex_type != "") {
+ $parameters = [
+ 'range_id' => $range_id,
+ 'ex_type' => $ex_type,
+ 'xslt_filename' => $filename,
+ 'o_mode' => 'choose',
+ 'filter' => $filter,
+ ];
+ }
+ else {
+ $parameters = [
+ 'range_id' => $range_id,
+ 'o_mode' => 'start',
+ ];
+ }
+ return Studip\LinkButton::create(_('Export'), URLHelper::getURL('export.php', $parameters));
+}
diff --git a/lib/export/export_run_fop.inc.php b/lib/export/export_run_fop.inc.php
new file mode 100644
index 0000000..24a87cd
--- /dev/null
+++ b/lib/export/export_run_fop.inc.php
@@ -0,0 +1,132 @@
+<?
+# Lifter002: TODO
+# Lifter007: TODO
+# Lifter003: TODO
+# Lifter010: TODO
+/**
+ * Export-Subfile that calls the FOP.
+ *
+ * This file calls the Formatting-Objects-Processor to generate PDF-Files.
+ *
+ * @author Arne Schroeder <schroeder@data.quest.de>
+ * @access public
+ * @modulegroup export_modules
+ * @module export_run_fop
+ * @package Export
+ */
+// +---------------------------------------------------------------------------+
+// This file is part of Stud.IP
+// export_run_fop.inc.php
+// pages for choosing an xslt-script
+//
+// Copyright (c) 2002 Arne Schroeder <schroeder@data-quest.de>
+// Suchi & Berg GmbH <info@data-quest.de>
+// +---------------------------------------------------------------------------+
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or any later version.
+// +---------------------------------------------------------------------------+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// +---------------------------------------------------------------------------+
+
+if (($o_mode != "direct") AND ($o_mode != "passthrough"))
+ $perm->check("tutor");
+
+
+/**
+ * Checks given parameters
+ *
+ * This function checks the given parameters. If some are missing
+ * it returns false and adds a warning to $export_error.
+ *
+ * @access public
+ * @return boolean
+ */
+function CheckParamRUN_FOP()
+{
+ global $export_error, $export_error_num, $result_file;
+
+ if ($result_file == "") {
+ $export_error .= "<b>" . _("Fehlende Parameter!") . "</b><br>";
+ $export_error_num++;
+ return false;
+ }
+
+
+ return true;
+}
+
+
+if (!CheckParamRUN_FOP()) {
+ PageLayout::postError(
+ _('Die Parameter, mit denen diese Seite aufgerufen wurde, sind fehlerhaft.')
+ );
+} elseif (!Config::get()->FOP_ENABLE) {
+ PageLayout::postInfo(
+ _('Die Erweiterung zum Erzeugen von PDF-Dateien ist nicht aktiviert, es konnten daher nur Formatting Objects erzeugt werden.')
+ );
+} else {
+ $export_pagename = _("Download der PDF-Datei");
+
+ // Process the document
+ escapeshellcmd($result_file);
+ escapeshellcmd($TMP_PATH);
+ $pdf_file = md5(uniqid(rand())) . ".pdf";
+
+ $str = "$FOP_SH_CALL $TMP_PATH/$result_file $TMP_PATH/$pdf_file ";
+
+ $out = exec($str);
+ if ($out == '') {
+ $out = $str;
+ }
+ if (file_exists($TMP_PATH . '/' . $pdf_file)) {
+ $link2 = '<a href="' . FileManager::getDownloadLinkForTemporaryFile($pdf_file, $xslt_filename . '.pdf') . '">';
+ $export_pagecontent = '<table cellspacing="0" cellpadding="0" border="0" width="40%"><tr align="center"><td>';
+ $export_pagecontent .= '<b>' . _("Ausgabe-Datei: ") . '</b>';
+ $export_pagecontent .= '</td><td>' . $link2 . $xslt_filename . '.pdf</a>';
+ $export_pagecontent .= '</td></tr></table><br>';
+
+ $result_printimage = ' <a href="' . FileManager::getDownloadLinkForTemporaryFile($pdf_file, $xslt_filename . '.pdf') . '">';
+ $result_printimage .= Icon::create($export_icon['pdf'], 'clickable')->asImg(['class' => 'text-top']);
+ $result_printimage .= '</a>';
+ $result_printlink = ' <a href="' . FileManager::getDownloadLinkForTemporaryFile($pdf_file, $xslt_filename . '.pdf') . '" class="tree"> ' . $xslt_filename . '.pdf</a>';
+ $result_printdesc = _("PDF-Datei");
+ $result_printcontent = _("Dies ist die fertige PDF-Datei.") . '<br>';
+ } else {
+ unset($result_printimage);
+ unset($result_printlink);
+ unset($result_printdesc);
+ unset($result_printcontent);
+ unset($export_info);
+ unset($export_msg);
+ $export_pagecontent = "";
+ $export_error = "<b>" . sprintf(_("Bei der Erzeugung der PDF-Datei ist ein Fehler aufgetreten. <br>Fehlermeldung: %s <br>Datei: %s"), $out, $pdf_file) . "</b><br>";
+ $export_error_num++;
+ }
+
+ $xml_printimage = ' <a href="' . FileManager::getDownloadLinkForTemporaryFile($xml_file_id, $xml_filename) . '">';
+ $xml_printimage .= Icon::create($export_icon['xml'], 'clickable')->asImg(['class' => 'text-top']);
+ $xml_printimage .= '</a>';
+ $xml_printlink = ' <a href="' . FileManager::getDownloadLinkForTemporaryFile($xml_file_id, $xml_filename) . '" class="tree"> ' . $xml_filename . '</a>';
+ $xml_printdesc = _("XML-Daten");
+ $xml_printcontent = _("In dieser Datei sind die Daten als XML-Tags gespeichert. Diese Tags können mit einem XSLT-Script verarbeitet werden.") . "<br>";
+
+ $xslt_printimage = '<a href="' . FileManager::getDownloadLinkForTemporaryFile($result_file, $xslt_filename . '.' . $format) . '">';
+ $xslt_printimage .= Icon::create($export_icon[$format], 'clickable')->asImg(['class' => 'text-top']);
+ $xslt_printimage .= '</a>';
+ $xslt_printlink = '<a href="' . FileManager::getDownloadLinkForTemporaryFile($result_file, $xslt_filename . '.' . $format) . '" class="tree">' . $xslt_filename . '.' . $format . '</a>';
+ $xslt_printdesc = _("Formatting-Objects-Datei");
+ $xslt_printcontent = _("In dieser Datei sind die Formatting Objects zur Erzeugung der PDF-Datei gespeichert.") . "<br>";
+
+ PageLayout::postSuccess(sprintf(
+ _('Um die Ausgabe-Datei herunterzuladen, klicken Sie %s hier %s.'),
+ $link2, '</a>'
+ ));
+}
diff --git a/lib/export/export_run_xslt.inc.php b/lib/export/export_run_xslt.inc.php
new file mode 100644
index 0000000..4505493
--- /dev/null
+++ b/lib/export/export_run_xslt.inc.php
@@ -0,0 +1,219 @@
+<?
+# Lifter002: TODO
+# Lifter007: TODO
+# Lifter003: TODO
+# Lifter010: TODO
+/**
+* Export-Subfile that calls the XSLT-Process.
+*
+* This file calls the XSLT-Process to convert XML-Files into other file-formats.
+*
+* @author Arne Schroeder <schroeder@data.quest.de>
+* @access public
+* @modulegroup export_modules
+* @module export_run_xslt
+* @package Export
+*/
+// +---------------------------------------------------------------------------+
+// This file is part of Stud.IP
+// export_run_xslt.inc.php
+// Integration of xslt-processor
+//
+// Copyright (c) 2002 Arne Schroeder <schroeder@data-quest.de>
+// Suchi & Berg GmbH <info@data-quest.de>
+// +---------------------------------------------------------------------------+
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or any later version.
+// +---------------------------------------------------------------------------+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// +---------------------------------------------------------------------------+
+
+use Studip\Button, Studip\LinkButton;
+
+if (($o_mode != "direct") AND ($o_mode != "passthrough"))
+ $perm->check("tutor");
+
+require_once ('lib/export/export_xslt_vars.inc.php'); // Liste der XSLT-Skripts
+
+/**
+* Checks given parameters
+*
+* This function checks the given parameters. If some are missing
+* it returns false and adds a warning to $export_error.
+*
+* @access public
+* @return boolean
+*/
+function CheckParamRUN()
+{
+global $ex_type, $o_mode, $xml_file_id, $format, $choose, $xslt_files, $export_error, $export_error_num, $export_o_modes, $export_ex_types;
+
+ if (($xml_file_id == "")
+ OR ($xslt_files[$choose]["file"] == "")
+ OR (Config::get()->XSLT_ENABLE != true))
+ {
+ $export_error .= "<b>" . _("Fehlende Parameter!") . "</b><br>";
+ $export_error_num++;
+ return false;
+ }
+
+ if (!in_array($ex_type, $export_ex_types)
+ OR (!in_array($o_mode, $export_o_modes))
+ OR (!$xslt_files[$choose][$format]))
+ {
+ $export_error .= "<b>" . _("Unzulässiger Seitenaufruf!") . "</b><br>";
+ $export_error_num++;
+ return false;
+ }
+
+ return true;
+}
+
+/**
+ * Convert all 2, 3 and 4 byte UTF-8 characters to the RTF unicode sequence \uX
+ *
+ * @param string $utf8_text rft document
+ * @return string converted document
+ */
+function encode_utf8_for_rtf($utf8_text)
+{
+ $utf8_patterns = [
+ "[\xC0-\xDF][\x80-\xBF]",
+ "[\xE0-\xEF][\x80-\xBF]{2}",
+ "[\xF0-\xF7][\x80-\xBF]{3}",
+ ];
+ $unicode_text = $utf8_text;
+
+ foreach($utf8_patterns as $pattern) {
+ $unicode_text = preg_replace_callback("/$pattern/",
+ function($treffer) {
+ return '\u'. hexdec(bin2hex(mb_convert_encoding($treffer[0], 'UCS-4', 'UTF-8'))).'?';
+ },
+ $unicode_text);
+ }
+
+ return $unicode_text;
+}
+
+$export_pagename = _("Download der Ausgabedatei");
+$xslt_process = false;
+$xslt_filename = Request::get('xslt_filename', $xslt_filename_default);
+
+if (!CheckParamRUN()) {
+ PageLayout::postError(
+ _('Die Parameter, mit denen diese Seite aufgerufen wurde, sind fehlerhaft.')
+ );
+} else {
+ // Process the document
+ $result_file = md5(uniqid(rand())) . "." . $format;
+ $result = "" . $TMP_PATH . "/" . $result_file;
+ $xml_process_file = "" . $TMP_PATH . "/" . $xml_file_id;
+ $xslt_process_file = $GLOBALS['STUDIP_BASE_PATH'] . '/lib/export/' . $xslt_files[$choose]["file"];
+
+ $xh = new XSLTProcessor();
+ $xml_doc = new DOMDocument();
+ $xml_doc->load($xml_process_file);
+ $xsl_doc = new DOMDocument();
+ $xsl_doc->load($xslt_process_file);
+ $xh->importStylesheet($xsl_doc);
+ $result_doc = $xh->transformToXML($xml_doc);
+ if ($result_doc) {
+ $processed = true;
+
+ // if the output format is rtf, convert utf-8 chars to rtf escape sequences
+ if ($format == 'rtf') {
+ $result_doc = encode_utf8_for_rtf($result_doc);
+ }
+
+ file_put_contents($result, $result_doc);
+ } else {
+ $xh = libxml_get_last_error();
+ }
+
+
+ if ( $processed && ($o_mode != "passthrough")) {
+ $export_msg .= sprintf(_("Die Daten wurden erfolgreich konvertiert. %s Sie k&ouml;nnen die Ausgabedatei jetzt herunterladen. %s"), "<br>", "<br>");
+ $xslt_info = _("Die Daten sind nun im gew&auml;hlten Format verf&uuml;gbar.");
+ $xslt_process = true;
+ $link1 = "<a href=\"" . $TMP_PATH . "/" . $result_file . "\">";
+ $link2 = '<a href="'. FileManager::getDownloadLinkForTemporaryFile($result_file, $xslt_filename .'.'. $format) . '">';
+
+ } elseif ($o_mode != "passthrough") {
+
+ if ($xh) $export_error .= sprintf(_("Bei der Konvertierung ist ein Fehler aufgetreten. %sDer XSLT-Prozessor meldet den Fehler %s %s"), "<br>", $xh->code, "<br>");
+ $xslt_info = _("Bei der Konvertierung ist ein Fehler aufgetreten.");
+ $xslt_process = false;
+ $export_error_num++;
+ }
+
+
+ if ($o_mode == "passthrough")
+ {
+ header("Location: " . FileManager::getDownloadURLForTemporaryFile($result_file, $xslt_filename .'.'. $format));
+ unlink( $TMP_PATH . "/" . $xml_file_id);
+ } else {
+
+ $export_weiter_button = "<form method=\"POST\" action=\"" . URLHelper::getURL() . "\">";
+ $export_weiter_button .= CSRFProtection::tokenTag();
+ $export_weiter_button .= "<input type=\"hidden\" name=\"page\" value=\"4\">";
+ $export_weiter_button .= "<input type=\"hidden\" name=\"choose\" value=\"" . htmlReady($choose) . "\">";
+ $export_weiter_button .= "<input type=\"hidden\" name=\"format\" value=\"" . htmlReady($format) . "\">";
+ $export_weiter_button .= "<input type=\"hidden\" name=\"o_mode\" value=\"" . htmlReady($o_mode) . "\">";
+ $export_weiter_button .= "<input type=\"hidden\" name=\"ex_type\" value=\"" . htmlReady($ex_type) . "\">";
+ $export_pagecontent .= "<input type=\"hidden\" name=\"ex_sem\" value=\"" . htmlReady($ex_sem) . "\">";
+ foreach(array_keys($ex_sem_class) as $semclassid){
+ $export_pagecontent .= "<input type=\"hidden\" name=\"ex_sem_class[". htmlReady($semclassid) ."]\" value=\"1\">";
+ }
+ $export_weiter_button .= "<input type=\"hidden\" name=\"range_id\" value=\"" . htmlReady($range_id) . "\">";
+ $export_weiter_button .= "<input type=\"hidden\" name=\"xml_file_id\" value=\"" . htmlReady($xml_file_id) . "\">";
+ $export_weiter_button .= "<input type=\"hidden\" name=\"xslt_filename\" value=\"" . htmlReady($xslt_filename) . "\">";
+ if (Request::option('jump'))
+ $export_weiter_button .= '<center>' . LinkButton::create('<< ' . _('Zurück'), URLHelper::getURL('seminar_main.php', ['auswahl' => $range_id, 'redirect_to' => $jump])) . "<br>";
+ else
+ $export_weiter_button .= "<center>" . Button::create('<< ' . _('Zurück'), 'back') . "<br>";
+ $export_weiter_button .= "</center></form>";
+
+ if ($xslt_process) {
+ $export_pagecontent .= "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><td width=\"40%\">";
+ $export_pagecontent .= "&nbsp; <b>" . _("Ausgabe-Datei: ") . "</b>";
+ $export_pagecontent .= "</td><td>" . $link2 . htmlReady($xslt_filename) . "." . htmlReady($format) . "</a>";
+ $export_pagecontent .= "</td></tr></table></center><br>";
+ }
+
+
+ $xml_printimage = ' <a href="' . FileManager::getDownloadLinkForTemporaryFile($xml_file_id, $xml_filename) . '" target="_blank">';
+ $xml_printimage.= Icon::create($export_icon['xml'], 'clickable')->asImg(['class' => 'text-top']);
+ $xml_printimage.= '</a>';
+ $xml_printlink = ' <a href="'. FileManager::getDownloadLinkForTemporaryFile($xml_file_id, $xml_filename) . '" class="tree">' . htmlReady($xml_filename) . '</a>';
+ $xml_printdesc = _("XML-Daten");
+ $xml_printcontent = _("In dieser Datei sind die Daten als XML-Tags gespeichert. Diese Tags können mit einem XSLT-Script verarbeitet werden.") . '<br>';
+
+ $xslt_printimage = ' <a href="'. FileManager::getDownloadLinkForTemporaryFile($xslt_files[$choose]['file'], $xslt_files[$choose]['name'].'.xsl') . '">';
+ $xslt_printimage.= Icon::create($export_icon['xslt'], 'clickable')->asImg(['class' => 'text-top']);
+ $xslt_printimage.= '</a>';
+ $xslt_printlink = ' <a href="' . FileManager::getDownloadLinkForTemporaryFile($xslt_files[$choose]['file'], $xslt_files[$choose]['name'].'.xsl') . '" class="tree"> ' . $xslt_files[$choose]['name'] . '.xsl</a>';
+ $xslt_printdesc = _("XSLT-Datei");
+ $xslt_printcontent = _("Dies ist das XSLT-Script zur Konvertierung der Daten. Klicken Sie auf den Dateinamen, um die Datei zu öffnen.") . '<br>';
+
+ if ($xslt_process) {
+ $result_printimage = '<a href="'. FileManager::getDownloadLinkForTemporaryFile($result_file, $xslt_filename .'.'. $format) . '">';
+ $result_printimage.= Icon::create($export_icon[$format], 'clickable')->asImg(['class' => 'text-top']);
+ $result_printimage.= '</a>';
+ $result_printlink = '<a href="'. FileManager::getDownloadLinkForTemporaryFile($result_file, $xslt_filename .'.'. $format) . '" class="tree"> ' . htmlReady($xslt_filename) . '.' . htmlReady($format) . '</a>';
+ $result_printdesc = _("Ausgabe-Datei");
+ $result_printcontent = _("Dies ist die fertige Ausgabedatei.") . "<br>";
+ }
+
+
+ include_once ("lib/export/oscar.php");
+ }
+
+}
diff --git a/lib/export/export_start.inc.php b/lib/export/export_start.inc.php
new file mode 100644
index 0000000..4a2c35a
--- /dev/null
+++ b/lib/export/export_start.inc.php
@@ -0,0 +1,137 @@
+<?
+# Lifter002: TODO
+# Lifter003: TEST
+# Lifter007: TODO
+# Lifter010: TODO
+/**
+* Export-Subfile that contains the first page of the export-module.
+*
+* This file shows the first page of the export-module where the type of export and the institute can be chosen.
+*
+* @author Arne Schroeder <schroeder@data.quest.de>
+* @access public
+* @modulegroup export_modules
+* @module export_start
+* @package Export
+*/
+// +---------------------------------------------------------------------------+
+// This file is part of Stud.IP
+// export_run_xslt.inc.php
+// Integration of xslt-processor
+//
+// Copyright (c) 2002 Arne Schroeder <schroeder@data-quest.de>
+// Suchi & Berg GmbH <info@data-quest.de>
+// +---------------------------------------------------------------------------+
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or any later version.
+// +---------------------------------------------------------------------------+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// +---------------------------------------------------------------------------+
+
+use Studip\Button, Studip\LinkButton;
+
+require_once ("lib/export/export_xslt_vars.inc.php"); // XSLT-Variablen
+
+$export_pagename = _("Datenexport - Startseite");
+
+$export_info = null;
+
+$export_pagecontent .= "<form class=\"default\" method=\"POST\" action=\"" . URLHelper::getURL() . "\">";
+
+$export_pagecontent .= CSRFProtection::tokenTag();
+$export_pagecontent .= "<fieldset><legend>"._("Bitte wählen Sie Datenart und Einrichtung.")."</legend>";
+$export_pagecontent .="<label>". _("Bitte wählen Sie eine Einrichtung: ") . "<br><select name=\"range_id\" class=\"nested-select\">";
+
+// Prepare institutes statement for faculty
+$query = "SELECT Institut_id, Name
+ FROM Institute
+ WHERE fakultaets_id = ? AND institut_id != fakultaets_id
+ ORDER BY Name";
+$inst_statement = DBManager::get()->prepare($query);
+
+// Prepare and execute faculties statement
+$query = "SELECT Institut_id, Name, fakultaets_id
+ FROM Institute
+ WHERE fakultaets_id = Institut_id
+ ORDER BY Name";
+$statement = DBManager::get()->query($query);
+$faculties = $statement->fetchAll(PDO::FETCH_ASSOC);
+
+foreach ($faculties as $faculty) {
+ $export_pagecontent .= "<option class=\"nested-item-header\" ";
+
+ if ($range_id == $faculty['fakultaets_id']) {
+ $export_pagecontent .= " selected";
+ }
+
+ $export_pagecontent .= " value=\"" . $faculty['Institut_id'] . "\">" . htmlReady(my_substr($faculty['Name'], 0, 60)) . "</option>";
+
+ $inst_statement->execute([$faculty['Institut_id']]);
+ while ($institute = $inst_statement->fetch(PDO::FETCH_ASSOC)) {
+ $export_pagecontent .= sprintf("<option value=\"%s\" class=\"nested-item\"", $institute['Institut_id']);
+ if ($range_id == $institute['Institut_id'] && $range_id != $faculty['Institut_id']) {
+ $export_pagecontent .= " selected";
+ }
+ $export_pagecontent .= sprintf(">%s </option>\n", htmlReady(my_substr($institute['Name'], 0, 60)));
+ }
+ $inst_statement->closeCursor();
+}
+
+if ($perm->have_perm("root")) {
+ $export_pagecontent .= "<option class=\"nested-item-header\" value=\"root\">Alle Einrichtungen";
+}
+
+$export_pagecontent .= "</select></label>";
+
+$export_pagecontent .= "<label>"._("Art der auszugebenden Daten: ") . "<select name=\"ex_type\">";
+
+$export_pagecontent .= "<option";
+if ($ex_type=="veranstaltung")
+ $export_pagecontent .= " selected";
+$export_pagecontent .= " value=\"veranstaltung\">" . _("Veranstaltungsdaten") . "</option>";
+
+$export_pagecontent .= "<option";
+if ($ex_type=="person") {
+ $export_pagecontent .= " selected";
+}
+$export_pagecontent .= " value=\"person\">" . _("MitarbeiterInnendaten") . "</option>";
+
+$export_pagecontent .= "</select></label>";
+
+$export_pagecontent .="<label>". _("Aus welchem Semester sollen die Daten exportiert werden (für Veranstaltungsexport): ");
+if (!isset($ex_sem)) {
+ $ex_sem = (Semester::findCurrent() ? Semester::findCurrent()->getId() : null);
+}
+$export_pagecontent .= Semester::getSemesterSelector(['name' => 'ex_sem'], $ex_sem, 'semester_id', true);
+$export_pagecontent .="</label>";
+
+$export_pagecontent .="<label>". _("Welche Arten von Veranstaltungen sollen exportiert werden? ") . "<br>";
+
+if (!count($ex_sem_class)) {
+ $ex_sem_class[1] = 1;
+}
+
+foreach (SeminarCategories::getAll() as $sem_class) {
+ if(!$sem_class->studygroup_mode){
+ $export_pagecontent .= "<input type=\"checkbox\" name=\"ex_sem_class[$sem_class->id]\" value=\"1\"";
+ if (isset($ex_sem_class[$sem_class->id])) $export_pagecontent .= " checked";
+ $export_pagecontent .= ">&nbsp;" . htmlready($sem_class->name) . "&nbsp;&nbsp;";
+ }
+}
+$export_pagecontent .= "</label>";
+
+$export_pagecontent .= "<input type=\"hidden\" name=\"o_mode\" value=\"choose\">";
+$export_pagecontent .= "<input type=\"hidden\" name=\"xslt_filename\" value=\"" . htmlReady($xslt_filename) . "\">";
+$export_pagecontent .= "<input type=\"hidden\" name=\"choose\" value=\"" . htmlReady($choose) . "\">";
+$export_pagecontent .= "<input type=\"hidden\" name=\"format\" value=\"" . htmlReady($format) . "\">";
+$export_pagecontent .= "</fieldset>";
+
+$export_weiter_button = "<footer>" . Button::create(_('Weiter') . ' >>' ) . "</footer></form>";
diff --git a/lib/export/export_studipdata_func.inc.php b/lib/export/export_studipdata_func.inc.php
new file mode 100644
index 0000000..360e068
--- /dev/null
+++ b/lib/export/export_studipdata_func.inc.php
@@ -0,0 +1,925 @@
+<?php
+# Lifter002: TODO
+# Lifter003: TEST (!)
+# Lifter007: TODO
+# Lifter010: TODO
+/**
+ * Export-Subfile that exports data.
+ *
+ * This file contains functions to get data from the Stud.IP-db and write it into a file.
+ *
+ * @author Arne Schroeder <schroeder@data.quest.de>
+ * @access public
+ * @modulegroup export_modules
+ * @module export_studipdata_functions
+ * @package Export
+ */
+// +---------------------------------------------------------------------------+
+// This file is part of Stud.IP
+// export_studipdata_func.inc.php
+// exportfunctions for the Stud.IP database
+//
+// Copyright (c) 2002 Arne Schroeder <schroeder@data-quest.de>
+// Suchi & Berg GmbH <info@data-quest.de>
+// +---------------------------------------------------------------------------+
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or any later version.
+// +---------------------------------------------------------------------------+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// +---------------------------------------------------------------------------+
+
+require_once 'lib/statusgruppe.inc.php';
+
+/**
+ * Writes the xml-stream into a file or to the screen.
+ *
+ * This function writes the xml-stream $object_data into a file or to the screen,
+ * depending on the content of $output_mode.
+ *
+ * @access public
+ * @param string $object_data xml-stream
+ * @param string $output_mode switch for output target
+ */
+function output_data($object_data, $output_mode = "file", $flush = false)
+{
+ global $xml_file;
+ static $fp;
+ if (is_null($fp)) {
+ $fp = fopen('php://temp', 'r+');
+ }
+
+ fwrite($fp, $object_data);
+
+ if ($flush && is_resource($fp)) {
+ rewind($fp);
+ if (in_array($output_mode, words('file processor passthrough choose'))) {
+ stream_copy_to_stream($fp, $xml_file);
+ } elseif ($output_mode == "direct") {
+ $out = fopen('php://output', 'w');
+ stream_copy_to_stream($fp, $out);
+ fclose($out);
+ }
+ fclose($fp);
+ }
+}
+
+/**
+ * Exports data of the given range.
+ *
+ * This function calls the functions that export the data sepcified by the given $export_range.
+ * It calls the function output_data afterwards.
+ *
+ * @access public
+ * @param string $range_id Stud.IP-range_id for export
+ */
+function export_range($range_id)
+{
+ global $o_mode, $range_name, $ex_person_details, $persons, $ex_sem;
+
+ // Ist die Range-ID eine Einrichtungs-ID?
+ $query = "SELECT Name FROM Institute WHERE Institut_id = ?";
+ $statement = DBManager::get()->prepare($query);
+ $statement->execute([$range_id]);
+ $name = $statement->fetchColumn();
+ if ($name) {
+ $range_name = $name;
+ output_data(xml_header(), $o_mode);
+ $output_startet = true;
+ export_inst($range_id);
+
+ }
+
+ // Ist die Range-ID eine Fakultaets-ID? Dann auch untergeordnete Institute exportieren!
+ $query = "SELECT Name, Institut_id
+ FROM Institute
+ WHERE fakultaets_id = ? AND Institut_id != fakultaets_id";
+ $statement = DBManager::get()->prepare($query);
+ $statement->execute([$range_id]);
+ while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {
+ if ($row['Name'] != '') {
+ // output_data ( xml_header(), $o_mode);
+ export_inst($row['Institut_id']);
+ }
+ }
+
+ // Ist die Range-ID eine Seminar-ID?
+ $query = "SELECT Name, Seminar_id, Institut_id
+ FROM seminare
+ WHERE Seminar_id = ?";
+ $statement = DBManager::get()->prepare($query);
+ $statement->execute([$range_id]);
+ $row = $statement->fetch(PDO::FETCH_ASSOC);
+ if ($row && $row['Name'] != '') {
+ $range_name = $row['Name'];
+ if (!$output_startet) {
+ output_data(xml_header(), $o_mode);
+ $output_startet = true;
+ }
+ export_inst($row['Institut_id'], $row['Seminar_id']);
+ }
+
+
+ // Ist die Range-ID ein Range-Tree-Item?
+ if ($range_id != 'root') {
+ $tree_object = new RangeTreeObject($range_id);
+ $range_name = $tree_object->item_data["name"];
+
+ // Tree-Item ist ein Institut:
+ if ($tree_object->item_data['studip_object'] == 'inst') {
+ if (!$output_startet) {
+ output_data(xml_header(), $o_mode);
+ $output_startet = true;
+ }
+ export_inst($tree_object->item_data['studip_object_id']);
+ }
+
+ // Tree-Item hat Institute als Kinder:
+ $inst_array = $tree_object->GetInstKids();
+
+ if (count($inst_array) > 0) {
+ if (!$output_startet) {
+ output_data(xml_header(), $o_mode);
+ $output_startet = true;
+ }
+ foreach ($inst_array as $key => $inst_ids) {
+ export_inst($inst_ids);
+ }
+ }
+ }
+
+ $query = "SELECT 1 FROM sem_tree WHERE sem_tree_id = ?";
+ $statement = DBManager::get()->prepare($query);
+ $statement->execute([$range_id]);
+ if ($statement->fetchColumn() || $range_id == 'root') {
+ if (!$output_startet) {
+ output_data(xml_header(), $o_mode);
+ $output_startet = true;
+ }
+ if (isset($ex_sem) && $semester = Semester::find($ex_sem)) {
+ $args = ['sem_number' => [Semester::getIndexById($ex_sem)]];
+ } else {
+ $args = [];
+ }
+ if ($range_id != 'root') {
+ $the_tree = TreeAbstract::GetInstance('StudipSemTree', $args);
+ $sem_ids = array_unique($the_tree->getSemIds($range_id, true));
+ }
+ if (is_array($sem_ids) || $range_id == 'root') {
+ if (is_array($sem_ids)) {
+ $query = "SELECT DISTINCT Institut_id
+ FROM seminare
+ WHERE Seminar_id IN (?)";
+ $statement = DBManager::get()->prepare($query);
+ $statement->execute([$sem_ids]);
+ $to_export = $statement->fetchAll(PDO::FETCH_COLUMN);
+ } else {
+ $sem_ids = 'root';
+
+ $query = "SELECT DISTINCT Institut_id
+ FROM seminare
+ INNER JOIN seminar_sem_tree USING (seminar_id)
+ INNER JOIN semester_courses ON (semester_courses.course_id = seminare.Seminar_id) ";
+ if ($semester) {
+ $query .= " WHERE seminare.start_time <= :begin
+ AND (semester_courses.semester_id IS NULL OR semester_courses.semester_id = :semester_id)";
+ $statement = DBManager::get()->prepare($query);
+ $statement->bindValue(':begin', $semester->beginn);
+ $statement->bindValue(':semester_id', $semester->semester_id);
+ $statement->execute();
+ } else {
+ $statement = DBManager::get()->query($query);
+ }
+
+ $to_export = $statement->fetchAll(PDO::FETCH_COLUMN);
+ }
+
+ foreach ($to_export as $inst) {
+ export_inst($inst, $sem_ids);
+ }
+ }
+ }
+
+ if ($ex_person_details && is_array($persons)) {
+ export_persons(array_keys($persons));
+ }
+ output_data(xml_footer(), $o_mode, $flush = true);
+}
+
+
+/**
+ * Exports a Stud.IP-institute.
+ *
+ * This function gets the data of an institute and writes it into $data_object.
+ * It calls one of the functions export_sem, export_pers or export_teilis and then output_data.
+ *
+ * @access public
+ * @param string $inst_id Stud.IP-inst_id for export
+ * @param string $ex_sem_id allows to choose if only a specific lecture is to be exported
+ */
+function export_inst($inst_id, $ex_sem_id = "all")
+{
+ global $ex_type, $o_mode, $xml_file, $xml_names_inst, $xml_groupnames_inst, $INST_TYPE;
+
+ $query = "SELECT * FROM Institute WHERE Institut_id = ?";
+ $statement = DBManager::get()->prepare($query);
+ $statement->execute([$inst_id]);
+ $institute = $statement->fetch(PDO::FETCH_ASSOC);
+
+ $data_object = xml_open_tag($xml_groupnames_inst["object"], $institute['Institut_id']);
+ foreach ($xml_names_inst as $key => $val) {
+ if ($val == '') {
+ $val = $key;
+ }
+ if ($key == 'type' && $INST_TYPE[$institute[$key]]['name'] != '') {
+ $data_object .= xml_tag($val, $INST_TYPE[$institute[$key]]['name']);
+ } elseif ($institute[$key] != '') {
+ $data_object .= xml_tag($val, $institute[$key]);
+ }
+ }
+ reset($xml_names_inst);
+
+ $query = "SELECT Name, Institut_id, type
+ FROM Institute
+ WHERE Institut_id = ? AND fakultaets_id = Institut_id";
+ $statement = DBManager::get()->prepare($query);
+ $statement->execute([$institute['fakultaets_id']]);
+ $faculty = $statement->fetch(PDO::FETCH_ASSOC);
+ if ($faculty['Name'] != '') {
+ $data_object .= xml_tag($xml_groupnames_inst["childobject"], $faculty['Name'], ['key' => $faculty['Institut_id']]);
+ }
+
+ // freie Datenfelder ausgeben
+ $data_object .= export_datafields($inst_id, $xml_groupnames_inst["childgroup2"], $xml_groupnames_inst["childobject2"], 'inst', $faculty['type']);
+ output_data($data_object, $o_mode);
+ $data_object = "";
+
+ switch ($ex_type) {
+ case "veranstaltung":
+ export_sem($inst_id, $ex_sem_id);
+ break;
+ case "person":
+ if ($ex_sem_id == "all")
+ export_pers($inst_id);
+ elseif ($GLOBALS['perm']->have_studip_perm('tutor', $ex_sem_id))
+ export_teilis($inst_id, $ex_sem_id);
+ else
+ $data_object .= xml_tag("message", _('Keine Berechtigung.'));
+ break;
+ default:
+ echo "</td></tr>";
+ echo '<tr><td>';
+ echo MessageBox::error(_('Der gewählte Exportmodus wird nicht unterstützt.'));
+ echo '</td></tr>';
+ echo "</table></td></tr></table>";
+ die();
+ }
+
+ $data_object .= xml_close_tag($xml_groupnames_inst["object"]);
+
+ output_data($data_object, $o_mode);
+ $data_object = "";
+}
+
+/**
+ * Exports lecture-data.
+ *
+ * This function gets the data of the lectures at an institute and writes it into $data_object.
+ * It calls output_data afterwards.
+ *
+ * @access public
+ * @param string $inst_id Stud.IP-inst_id for export
+ * @param string $ex_sem_id allows to choose if only a specific lecture is to be exported
+ */
+function export_sem($inst_id, $ex_sem_id = 'all')
+{
+ global $range_id, $xml_file, $o_mode, $xml_names_lecture, $xml_groupnames_lecture, $object_counter, $SEM_TYPE, $SEM_CLASS, $filter, $ex_sem, $ex_sem_class, $ex_person_details, $persons;
+
+ $ex_only_homeinst = Request::int('ex_only_homeinst', 0);
+
+ // Prepare user count statement
+ $query = "SELECT COUNT(user_id)
+ FROM seminar_user
+ WHERE seminar_id = ? AND status = 'autor'";
+ $count_statement = DBManager::get()->prepare($query);
+
+ // Prepare inner statement
+ $query = "SELECT seminar_user.position,
+ auth_user_md5.user_id, auth_user_md5.username, auth_user_md5.Vorname, auth_user_md5.Nachname,
+ user_info.title_front, user_info.title_rear
+ FROM seminar_user
+ LEFT JOIN user_info USING (user_id)
+ LEFT JOIN auth_user_md5 USING (user_id)
+ WHERE seminar_user.status = 'dozent' AND seminar_user.Seminar_id = ?
+ ORDER BY seminar_user.position";
+ $inner_statement = DBManager::get()->prepare($query);
+
+ // Prepare (build) and execute outmost query
+ switch ($filter) {
+ case "seminar":
+ $order = " seminare.Name";
+ break;
+ case "status":
+ $order = "seminare.status, seminare.Name";
+ $group = "FIRSTGROUP";
+ $group_tab_zelle = "status";
+ $do_group = true;
+ break;
+ default:
+ $order = "seminare.status, seminare.Name";
+ $group = "FIRSTGROUP";
+ $group_tab_zelle = "status";
+ $do_group = true;
+ }
+
+ $parameters = [];
+
+ if (isset($ex_sem) && $semester = Semester::find($ex_sem)) {
+ $addjoin = " LEFT JOIN semester_courses ON (semester_courses.course_id = seminare.Seminar_id) ";
+ $addquery = " AND seminare.start_time <= :begin AND (semester_courses.semester_id IS NULL OR semester_courses.semester_id = :semester_id) ";
+ $parameters[':begin'] = $semester->beginn;
+ $parameters[':semester_id'] = $semester->id;
+ }
+
+ if ($ex_sem_id != 'all') {
+ if ($ex_sem_id == 'root') {
+ $addquery .= " AND EXISTS (SELECT * FROM seminar_sem_tree WHERE seminar_sem_tree.seminar_id = seminare.Seminar_id) ";
+ } else {
+ if (!is_array($ex_sem_id)) $ex_sem_id = [$ex_sem_id];
+ $ex_sem_id = array_flip($ex_sem_id);
+ }
+ }
+
+ if (!$GLOBALS['perm']->have_perm('root') && !$GLOBALS['perm']->have_studip_perm('admin', $inst_id)) {
+ $addquery .= " AND visible = 1 ";
+ }
+
+ if (count($ex_sem_class) > 0) {
+ $allowed_sem_types = [];
+ foreach (array_keys($ex_sem_class) as $semclassid) {
+ $allowed_sem_types = array_merge($allowed_sem_types, array_keys(SeminarCategories::get($semclassid)->getTypes()));
+ }
+ $addquery .= " AND seminare.status IN (:status) ";
+ $parameters[':status'] = $allowed_sem_types;
+ } else {
+ $addquery .= " AND seminare.status NOT IN (:status) ";
+ $parameters[':status'] = studygroup_sem_types() ?: '';
+ }
+
+ if ($ex_only_homeinst) {
+ $query = "SELECT seminare.*,Seminar_id as seminar_id, Institute.Name AS heimateinrichtung
+ FROM seminare
+ LEFT JOIN Institute USING (Institut_id)
+ {$addjoin}
+ WHERE Institut_id = :institute_id {$addquery}
+ ORDER BY " . $order;
+ $parameters[':institute_id'] = $inst_id;
+ } else {
+ $query = "SELECT seminare.*,Seminar_id as seminar_id, Institute.Name AS heimateinrichtung
+ FROM seminar_inst
+ LEFT JOIN seminare USING (Seminar_id)
+ LEFT JOIN Institute ON seminare.Institut_id = Institute.Institut_id
+ {$addjoin}
+ WHERE seminar_inst.Institut_id = :institute_id {$addquery}
+ ORDER BY " . $order;
+ $parameters[':institute_id'] = $inst_id;
+ }
+ $statement = DBManager::get()->prepare($query);
+ $statement->execute($parameters);
+ $data = $statement->fetchAll(PDO::FETCH_ASSOC);
+
+ $data_object .= xml_open_tag($xml_groupnames_lecture['group']);
+
+ foreach ($data as $row) {
+ if (is_array($ex_sem_id) && !isset($ex_sem_id[$row['seminar_id']])) {
+ continue;
+ }
+ $group_string = '';
+ if ($do_group && $group != $row[$group_tab_zelle]) {
+ if ($group != 'FIRSTGROUP') {
+ $group_string .= xml_close_tag($xml_groupnames_lecture['subgroup1']);
+ }
+ if ($group_tab_zelle == 'status') {
+ $group_string .= xml_open_tag($xml_groupnames_lecture['subgroup1'], $SEM_TYPE[$row[$group_tab_zelle]]['name']);
+ } else {
+ $group_string .= xml_open_tag($xml_groupnames_lecture['subgroup1'], $row[$group_tab_zelle]);
+ }
+ $group = $row[$group_tab_zelle];
+ if ($do_subgroup && $subgroup == $row[$subgroup_tab_zelle]) {
+ $subgroup = "NEXTGROUP";
+ }
+ }
+ if ($do_subgroup && $subgroup != $row[$subgroup_tab_zelle]) {
+ if ($subgroup != 'FIRSTGROUP') {
+ $group_string = xml_close_tag($xml_groupnames_lecture['subgroup2']) . $group_string;
+ }
+ $group_string .= xml_open_tag($xml_groupnames_lecture['subgroup2'], $row[$subgroup_tab_zelle]);
+ $subgroup = $row[$subgroup_tab_zelle];
+ }
+ $data_object .= $group_string;
+ $object_counter += 1;
+ $data_object .= xml_open_tag($xml_groupnames_lecture['object'], $row['seminar_id']);
+ $course_object = new Course($row['seminar_id']);
+ $sem_obj = new Seminar($course_object);
+ foreach ($xml_names_lecture as $key => $val) {
+ if (!$val) {
+ $val = $key;
+ }
+ if ($key === 'status') {
+ $data_object .= xml_tag($val, $SEM_TYPE[$row[$key]]['name']);
+ } elseif ($key === 'ort') {
+ $data_object .= xml_tag($val, $sem_obj->getDatesTemplate('dates/seminar_export_location'));
+ } elseif ($key === 'bereich' && $SEM_CLASS[$SEM_TYPE[$row['status']]['class']]['bereiche']) {
+ $data_object .= xml_open_tag($xml_groupnames_lecture['childgroup3']);
+ $pathes = get_sem_tree_path($row['seminar_id']);
+ if (is_array($pathes)) {
+ foreach ($pathes as $path_name) {
+ $data_object .= xml_tag($val, $path_name);
+ }
+ } else {
+ $data_object .= xml_tag($val, 'n.a.');
+ }
+ $data_object .= xml_close_tag($xml_groupnames_lecture['childgroup3']);
+ } elseif ($key === 'lvgruppe' && $SEM_CLASS[$SEM_TYPE[$row['status']]['class']]['module']) {
+ $data_object .= xml_open_tag($xml_groupnames_lecture['childgroup3a']);
+ ModuleManagementModelTreeItem::setObjectFilter('Modul', function ($modul) use ($course_object) {
+ // check for public status
+ if (!$GLOBALS['MVV_MODUL']['STATUS']['values'][$modul->stat]['public']) {
+ return false;
+ }
+ $modul_start = Semester::find($modul->start)->beginn ?: 0;
+ $modul_end = Semester::find($modul->end)->beginn ?: PHP_INT_MAX;
+ return ($course_object->start_time <= $modul_end)
+ && (
+ ($course_object->start_time >= $modul_start)
+ || $course_object->isOpenEnded()
+ || $course_object->getEndSemester()->ende <= $modul_end
+ || $course_object->getEndSemester()->ende >= $modul_start
+ );
+ });
+ ModuleManagementModelTreeItem::setObjectFilter('StgteilVersion', function ($version) {
+ return $GLOBALS['MVV_STGTEILVERSION']['STATUS']['values'][$version->stat]['public'];
+ });
+ $trail_classes = ['Modulteil', 'StgteilabschnittModul', 'StgteilAbschnitt', 'StgteilVersion'];
+ $mvv_object_paths = MvvCourse::get($sem_obj->id)->getTrails($trail_classes);
+ $mvv_paths = [];
+
+ foreach ($mvv_object_paths as $mvv_object_path) {
+ // show only complete paths
+ if (count($mvv_object_path) === 4) {
+ $mvv_object_names = [];
+ foreach ($mvv_object_path as $mvv_object) {
+ $mvv_object_names[] = $mvv_object->getDisplayName();
+ }
+ $mvv_paths[] = implode(' > ', $mvv_object_names);
+ }
+ }
+ foreach ($mvv_paths as $mvv_path) {
+ $data_object .= xml_tag($val, $mvv_path);
+ }
+ $data_object .= xml_close_tag($xml_groupnames_lecture['childgroup3a']);
+ } elseif ($key === 'admission_turnout') {
+ $data_object .= xml_open_tag($val, $row['admission_type'] ? _('max.') : _('erw.'));
+ $data_object .= $row[$key];
+ $data_object .= xml_close_tag($val);
+ } elseif ($key === 'teilnehmer_anzahl_aktuell') {
+ $count_statement->execute([$row['seminar_id']]);
+ $count = $count_statement->fetchColumn();
+ $count_statement->closeCursor();
+
+ $data_object .= xml_tag($val, $count);
+ } elseif ($key === 'metadata_dates') {
+ $data_object .= xml_open_tag($xml_groupnames_lecture['childgroup1']);
+ $vorb = vorbesprechung($row['seminar_id'], 'export');
+ if ($vorb != false) {
+ $data_object .= xml_tag($val[0], $vorb);
+ }
+ if (($first_date = SeminarDB::getFirstDate($row['seminar_id']))
+ && count($first_date)) {
+ $really_first_date = new SingleDate($first_date[0]);
+ $data_object .= xml_tag($val[1], $really_first_date->getDatesExport());
+ }
+ $data_object .= xml_tag($val[2], $sem_obj->getDatesExport());
+ $data_object .= xml_close_tag($xml_groupnames_lecture["childgroup1"]);
+ } elseif ($key === 'Institut_id') {
+ $data_object .= xml_tag($val, $row['heimateinrichtung'], ['key' => $row[$key]]);
+ } elseif ($row[$key] !== '')
+ $data_object .= xml_tag($val, $row[$key]);
+ }
+
+ $data_object .= "<" . $xml_groupnames_lecture['childgroup2'] . ">\n";
+
+ $inner_statement->execute([$row['seminar_id']]);
+ while ($inner = $inner_statement->fetch(PDO::FETCH_ASSOC)) {
+ if ($ex_person_details) {
+ $persons[$inner['user_id']] = true;
+ }
+ $content_string = $inner['Vorname'] . ' ' . $inner['Nachname'];
+ if ($inner['title_front'] != '') {
+ $content_string = $inner['title_front'] . ' ' . $content_string;
+ }
+ if ($inner['title_rear'] != '') {
+ $content_string .= ', ' . $inner['title_rear'];
+ }
+ $data_object .= xml_tag($xml_groupnames_lecture['childobject2'], $content_string, ['key' => $inner['username']]);
+ }
+
+ $data_object .= xml_close_tag($xml_groupnames_lecture['childgroup2']);
+ // freie Datenfelder ausgeben
+ $data_object .= export_datafields($row['seminar_id'], $xml_groupnames_lecture['childgroup4'], $xml_groupnames_lecture['childobject4'], 'sem', $row['status']);
+ $data_object .= xml_close_tag($xml_groupnames_lecture['object']);
+ reset($xml_names_lecture);
+ output_data($data_object, $o_mode);
+ $data_object = '';
+ }
+
+ if ($do_subgroup && $subgroup != 'FIRSTGROUP') {
+ $data_object .= xml_close_tag($xml_groupnames_lecture['subgroup2']);
+ }
+ if ($do_group && $group != 'FIRSTGROUP') {
+ $data_object .= xml_close_tag($xml_groupnames_lecture['subgroup1']);
+ }
+
+ $data_object .= xml_close_tag($xml_groupnames_lecture['group']);
+ output_data($data_object, $o_mode);
+}
+
+
+/**
+ * Exports member-list for a Stud.IP-lecture.
+ *
+ * This function gets the data of the members of a lecture and writes it into $data_object.
+ * It calls output_data afterwards.
+ *
+ * @access public
+ * @param string $inst_id Stud.IP-inst_id for export
+ * @param string $ex_sem_id allows to choose which lecture is to be exported
+ */
+function export_teilis($inst_id, $ex_sem_id = "no")
+{
+ global $range_id, $xml_file, $o_mode, $xml_names_person, $xml_groupnames_person, $xml_names_studiengaenge, $xml_groupnames_studiengaenge, $object_counter, $filter, $SEM_CLASS, $SEM_TYPE;
+
+ if ($filter == 'status') {
+ $query = "SELECT statusgruppe_id, name
+ FROM statusgruppen
+ WHERE range_id = ?
+ ORDER BY position ASC";
+ $statement = DBManager::get()->prepare($query);
+ $statement->execute([$ex_sem_id]);
+ $gruppe = $statement->fetchGrouped(PDO::FETCH_COLUMN);
+
+ $gruppe['no'] = _('keiner Funktion oder Gruppe zugeordnet');
+ } else {
+
+ if (!in_array($filter, words('awaiting claiming'))) {
+ $gruppe = [
+ 'dozent' => get_title_for_status('dozent', 2),
+ 'tutor' => get_title_for_status('tutor', 2),
+ 'autor' => get_title_for_status('autor', 2),
+ 'user' => get_title_for_status('user', 2),
+ 'accepted' => get_title_for_status('accepted', 2)
+ ];
+ } else {
+ $gruppe[$filter] = _('Anmeldeliste');
+ }
+ }
+
+ $data_object = xml_open_tag($xml_groupnames_person['group']);
+
+ foreach ($gruppe as $key1 => $val1) {
+ $parameters = [];
+ if ($filter == 'status') {
+ // Gruppierung nach Statusgruppen / Funktionen
+ if ($key1 == 'no') {
+ $query = "SELECT ui.*, aum.*, su.*, FROM_UNIXTIME(su.mkdate) AS registration_date,
+ GROUP_CONCAT(CONCAT_WS(',', sg.name, a.name, user_studiengang.semester) SEPARATOR '; ') AS nutzer_studiengaenge
+ FROM seminar_user AS su
+ LEFT JOIN auth_user_md5 AS aum USING (user_id)
+ LEFT JOIN user_info AS ui USING (user_id)
+ LEFT JOIN user_studiengang USING (user_id)
+ LEFT JOIN fach AS sg USING(fach_id)
+ LEFT JOIN abschluss AS a USING (abschluss_id)
+ WHERE seminar_id = :seminar_id
+ GROUP BY aum.user_id
+ ORDER BY Nachname, Vorname";
+ $parameters[':seminar_id'] = $ex_sem_id;
+ } else {
+ $query = "SELECT DISTINCT ui.*, aum.*, su.*, FROM_UNIXTIME(su.mkdate) AS registration_date,
+ GROUP_CONCAT(CONCAT_WS(',', sg.name, a.name, user_studiengang.semester) SEPARATOR '; ') AS nutzer_studiengaenge
+ FROM statusgruppe_user
+ LEFT JOIN seminar_user AS su USING (user_id)
+ LEFT JOIN auth_user_md5 AS aum USING (user_id)
+ LEFT JOIN user_info AS ui USING (user_id)
+ LEFT JOIN user_studiengang USING(user_id)
+ LEFT JOIN fach AS sg USING(fach_id)
+ LEFT JOIN abschluss AS a USING (abschluss_id)
+ WHERE statusgruppe_id = :statusgruppe_id AND seminar_id = :seminar_id
+ GROUP BY aum.user_id
+ ORDER BY Nachname, Vorname";
+ $parameters[':seminar_id'] = $ex_sem_id;
+ $parameters[':statusgruppe_id'] = $key1;
+ }
+ } // Gruppierung nach Status in der Veranstaltung / Einrichtung
+ else if ($key1 == 'accepted') {
+ $query = "SELECT ui.*, aum.*, asu.comment,
+ FROM_UNIXTIME(asu.mkdate) AS registration_date,
+ GROUP_CONCAT(CONCAT_WS(',', sg.name, a.name, user_studiengang.semester) SEPARATOR '; ') AS nutzer_studiengaenge
+ FROM admission_seminar_user AS asu
+ LEFT JOIN user_info AS ui USING (user_id)
+ LEFT JOIN auth_user_md5 AS aum USING (user_id)
+ LEFT JOIN user_studiengang USING (user_id)
+ LEFT JOIN fach AS sg ON (user_studiengang.fach_id = sg.fach_id)
+ LEFT JOIN abschluss AS a USING (abschluss_id)
+ WHERE seminar_id = :seminar_id AND asu.status = 'accepted'
+ GROUP BY aum.user_id
+ ORDER BY Nachname, Vorname";
+ $parameters[':seminar_id'] = $ex_sem_id;
+ } elseif ($key1 == 'awaiting') {
+ $query = "SELECT ui.*, aum.*, asu.comment,
+ asu.position AS admission_position,
+ GROUP_CONCAT(CONCAT_WS(',', sg.name, a.name, user_studiengang.semester) SEPARATOR '; ') AS nutzer_studiengaenge
+ FROM admission_seminar_user AS asu
+ LEFT JOIN user_info AS ui USING(user_id)
+ LEFT JOIN auth_user_md5 AS aum USING(user_id)
+ LEFT JOIN user_studiengang USING(user_id)
+ LEFT JOIN fach AS sg ON (user_studiengang.fach_id = sg.fach_id)
+ LEFT JOIN abschluss AS a USING (abschluss_id)
+ WHERE asu.seminar_id = :seminar_id AND asu.status != 'accepted'
+ GROUP BY aum.user_id ORDER BY position";
+ $parameters[':seminar_id'] = $ex_sem_id;
+ } elseif ($key1 == 'claiming') {
+ $cs = CourseSet::getSetForCourse($ex_sem_id);
+ if (is_object($cs) && !$cs->hasAlgorithmRun()) {
+ $parameters[':users'] = array_keys(AdmissionPriority::getPrioritiesByCourse($cs->getId(), $ex_sem_id));
+ } else {
+ $parameters[':users'] = [];
+ }
+ $query = "SELECT ui.*, aum.*, '' as comment,
+ 0 AS admission_position,
+ GROUP_CONCAT(CONCAT_WS(',', sg.name, a.name, user_studiengang.semester) SEPARATOR '; ') AS nutzer_studiengaenge
+ FROM auth_user_md5 AS aum
+ INNER JOIN user_info AS ui USING(user_id)
+ LEFT JOIN user_studiengang USING(user_id)
+ LEFT JOIN fach AS sg ON (user_studiengang.fach_id = sg.fach_id)
+ LEFT JOIN abschluss AS a USING (abschluss_id)
+ WHERE aum.user_id IN (:users)
+ GROUP BY aum.user_id ORDER BY Nachname, Vorname";
+ } else {
+ $query = "SELECT ui.*, aum.*, su.*, FROM_UNIXTIME(su.mkdate) AS registration_date,
+ GROUP_CONCAT(CONCAT_WS(',', sg.name, a.name, us.semester) SEPARATOR '; ') AS nutzer_studiengaenge
+ FROM seminar_user AS su
+ LEFT JOIN auth_user_md5 AS aum USING ( user_id )
+ LEFT JOIN user_info AS ui USING ( user_id )
+ LEFT JOIN user_studiengang AS us USING(user_id)
+ LEFT JOIN fach AS sg USING (fach_id)
+ LEFT JOIN abschluss AS a USING (abschluss_id)
+ WHERE seminar_id = :seminar_id AND su.status = :status
+ GROUP BY aum.user_id
+ ORDER BY " . ($key1 === 'dozent' ? 'position, ' : '') . "Nachname, Vorname";
+ $parameters[':seminar_id'] = $ex_sem_id;
+ $parameters[':status'] = $key1;
+ }
+
+ $statement = DBManager::get()->prepare($query);
+ $statement->execute($parameters);
+ $data = $statement->fetchAll(PDO::FETCH_ASSOC);
+ $course = Course::find($ex_sem_id);
+ if ($course->aux) {
+ $zusatzangaben = array_keys($course->aux->datafields);
+ } else {
+ $zusatzangaben = [];
+ }
+ $data_object_tmp = '';
+ $object_counter_tmp = $object_counter;
+ if (count($data) > 0) {
+ $data_object_tmp .= xml_open_tag($xml_groupnames_person['subgroup1'], $val1);
+ foreach ($data as $row) {
+ // Nur Personen ausgeben, die entweder einer Gruppe angehoeren
+ // oder zur Veranstaltung gehoeren und noch nicht ausgegeben wurden.
+ if ($key1 != 'no' || $person_out[$row['user_id']] != true) {
+ $object_counter += 1;
+ $data_object_tmp .= xml_open_tag($xml_groupnames_person["object"], $row['username']);
+
+ reset($xml_names_person);
+ foreach ($xml_names_person as $key => $val) {
+ if ($val == '') {
+ $val = $key;
+ }
+ if ($row[$key] != '') {
+ $data_object_tmp .= xml_tag($val, $row[$key]);
+ }
+ }
+ // freie Datenfelder ausgeben
+ $data_object_tmp .= export_datafields($row['user_id'], $xml_groupnames_person['childgroup1'], $xml_groupnames_person['childobject1'], 'user');
+ $data_object_tmp .= export_datafields([$row['user_id'], $ex_sem_id], 'zusatzangaben', 'zusatzangabe', 'usersemdata', null, $zusatzangaben);
+ $data_object_tmp .= xml_close_tag($xml_groupnames_person['object']);
+ $person_out[$row['user_id']] = true;
+ }
+ }
+ $data_object_tmp .= xml_close_tag($xml_groupnames_person['subgroup1']);
+ if ($object_counter_tmp != $object_counter) {
+ $data_object .= $data_object_tmp;
+ }
+ }
+ }
+
+ $data_object .= xml_close_tag($xml_groupnames_person['group']);
+
+ if (!in_array($filter, words('status awaiting accepted'))) {
+ $query = "SELECT CONCAT_WS(',', fach.name, abschluss.name) AS name, COUNT(*) AS c
+ FROM seminar_user
+ INNER JOIN user_studiengang USING (user_id)
+ LEFT JOIN fach USING (fach_id)
+ LEFT JOIN abschluss USING (abschluss_id)
+ WHERE seminar_id = ?
+ GROUP BY name";
+ $statement = DBManager::get()->prepare($query);
+ $statement->execute([$ex_sem_id]);
+ $studiengang_count = $statement->fetchGrouped(PDO::FETCH_COLUMN);
+
+ if (count($studiengang_count) > 0) {
+ $data_object .= xml_open_tag($xml_groupnames_studiengaenge["group"]);
+ for ($i = 0; $i < count($studiengang_count); $i += 1) { // TODO: Is this really neccessary?
+ foreach ($studiengang_count as $key => $val) {
+ $data_object .= xml_open_tag($xml_groupnames_studiengaenge['object']);
+ $data_object .= xml_tag($xml_names_studiengaenge['name'], $key);
+ $data_object .= xml_tag($xml_names_studiengaenge['count'], $val);
+ $data_object .= xml_close_tag($xml_groupnames_studiengaenge['object']);
+ }
+ }
+ $data_object .= xml_close_tag($xml_groupnames_studiengaenge['group']);
+ }
+ }
+
+ output_data($data_object, $o_mode);
+}
+
+/**
+ * Exports member-list for a Stud.IP-institute.
+ *
+ * This function gets the data of the members of an institute and writes it into $data_object.
+ * The order of the members depends on the grouping-option $filter.
+ * It calls output_data afterwards.
+ *
+ * @access public
+ * @param string $inst_id Stud.IP-inst_id for export
+ * @param string $ex_sem_id allows to choose which lecture is to be exported
+ */
+function export_pers($inst_id)
+{
+ global $range_id, $xml_file, $o_mode, $xml_names_person, $xml_groupnames_person, $object_counter, $filter;
+
+ $group = 'FIRSTGROUP';
+ $group_tab_zelle = 'name';
+ $do_group = true;
+
+ // fetch all statusgroups and their hierarchical structure
+ $roles = GetRoleNames(GetAllStatusgruppen($inst_id), 0, '', true) ?: [];
+
+ // traverse and join statusgroups with memberdates
+ $rows = [];
+ foreach ($roles as $group_id => $data) {
+ $query = "SELECT statusgruppen.name, statusgruppen.statusgruppe_id, aum.user_id,
+ aum.Nachname, aum.Vorname, ui.inst_perms, ui.raum,
+ ui.sprechzeiten, ui.Telefon, ui.Fax, aum.Email,
+ aum.username, info.Home, info.geschlecht, info.title_front, info.title_rear
+ FROM statusgruppen
+ JOIN statusgruppe_user sgu USING(statusgruppe_id)
+ JOIN user_inst ui ON (ui.user_id = sgu.user_id AND ui.Institut_id = ? AND ui.inst_perms!='user')
+ JOIN auth_user_md5 aum ON (ui.user_id = aum.user_id)
+ LEFT JOIN user_info info ON (ui.user_id = info.user_id)
+ WHERE statusgruppe_id = ?
+ ORDER BY sgu.position";
+ $statement = DBManager::get()->prepare($query);
+ $statement->execute([$inst_id, $group_id]);
+ $rows = array_merge($rows, $statement->fetchAll(PDO::FETCH_ASSOC));
+ }
+ // create xml-output
+ $data_object = xml_open_tag($xml_groupnames_person['group']);
+ foreach ($rows as $row) {
+ $data_found = true;
+ $group_string = '';
+ if ($do_group && $group != $row[$group_tab_zelle]) {
+ if ($group != 'FIRSTGROUP') {
+ $group_string .= xml_close_tag($xml_groupnames_person['subgroup1']);
+ }
+ $group_string .= xml_open_tag($xml_groupnames_person['subgroup1'], $roles[$row['statusgruppe_id']]);
+ $group = $row[$group_tab_zelle];
+ }
+ $data_object .= $group_string;
+ $object_counter += 1;
+ $data_object .= xml_open_tag($xml_groupnames_person["object"], $row['username']);
+ foreach ($xml_names_person as $key => $val) {
+ if ($val == '') {
+ $val = $key;
+ }
+ if (mb_strtolower($key) == 'email') {
+ $row[$key] = get_visible_email($row['user_id']);
+ }
+ if ($row[$key] != '') {
+ $data_object .= xml_tag($val, $row[$key]);
+ }
+ }
+ // freie Datenfelder ausgeben
+ $data_object .= export_datafields($row['user_id'], $xml_groupnames_person['childgroup1'], $xml_groupnames_person['childobject1'], 'user');
+ $data_object .= xml_close_tag($xml_groupnames_person['object']);
+ reset($xml_names_person);
+ output_data($data_object, $o_mode);
+ $data_object = '';
+ }
+
+ if ($do_group && $data_found) {
+ $data_object .= xml_close_tag($xml_groupnames_person['subgroup1']);
+ }
+
+ $data_object .= xml_close_tag($xml_groupnames_person['group']);
+
+ if ($data_found) {
+ output_data($data_object, $o_mode);
+ }
+}
+
+/**
+ * Exports list of persons.
+ *
+ *
+ * @access public
+ * @param array $persons Stud.IP-user_ids for export
+ */
+function export_persons($persons)
+{
+ global $xml_names_person, $xml_groupnames_person, $object_counter, $o_mode, $ex_person_details;
+
+ if (!is_array($persons) or count($persons) == 0) {
+ return;
+ }
+
+ $query = "SELECT *
+ FROM auth_user_md5
+ LEFT JOIN user_info USING (user_id)
+ WHERE user_id IN (?)";
+ $statement = DBManager::get()->prepare($query);
+ $statement->execute([$persons]);
+ while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {
+ $object_counter += 1;
+
+ $data_object = xml_open_tag($xml_groupnames_person['object'], $row['username']);
+ if ($ex_person_details) {
+ $data_object .= xml_tag('id', $row['user_id']);
+ }
+ foreach ($xml_names_person as $key => $val) {
+ if ($val == '') {
+ $val = $key;
+ }
+ if ($row[$key] != '') {
+ $data_object .= xml_tag($val, $row[$key]);
+ }
+ }
+ // freie Datenfelder ausgeben
+ $data_object .= export_datafields($row['user_id'], $xml_groupnames_person['childgroup1'], $xml_groupnames_person['childobject1'], 'user');
+ $data_object .= xml_close_tag($xml_groupnames_person['object']);
+ reset($xml_names_person);
+ output_data($data_object, $o_mode);
+ }
+}
+
+/**
+ * helper function to export custom datafields
+ *
+ * only visible datafields are exported (depending on user perms)
+ * @access public
+ * @param string $range_id id for object to export
+ * @param string $childgroup_tag name of outer tag
+ * @param string $childobject_tag name of inner tags
+ */
+function export_datafields($range_id, $childgroup_tag, $childobject_tag, $object_type = null, $object_class_hint = null, $only_these = null)
+{
+ $ret = '';
+ $d_fields = false;
+ $localEntries = DataFieldEntry::getDataFieldEntries($range_id, $object_type, $object_class_hint);
+ if (is_array($localEntries)) {
+ foreach ($localEntries as $entry) {
+ if (is_array($only_these)) {
+ if (!in_array($entry->getId(), $only_these)) {
+ continue;
+ }
+ }
+ if ($entry->isVisible(null, false) && ($entry->getDisplayValue() || $only_these)) {
+ if (!$d_fields) $ret .= xml_open_tag($childgroup_tag);
+ $ret .= xml_open_tag($childobject_tag, $entry->getName());
+ $ret .= xml_escape($entry->getDisplayValue(false));
+ $ret .= xml_close_tag($childobject_tag);
+ $d_fields = true;
+ }
+ }
+ }
+ if ($d_fields) $ret .= xml_close_tag($childgroup_tag);
+ return $ret;
+}
diff --git a/lib/export/export_tmp_gc.inc.php b/lib/export/export_tmp_gc.inc.php
new file mode 100644
index 0000000..62ab36b
--- /dev/null
+++ b/lib/export/export_tmp_gc.inc.php
@@ -0,0 +1,64 @@
+<?php
+# Lifter002: TODO
+# Lifter007: TODO
+# Lifter003: TODO
+# Lifter010: TODO
+/**
+* function to delete old files in the export tmp-directory.
+*
+* This file checks the tmp-directory for old files an deletes them.
+*
+* @author Arne Schroeder <schroeder@data.quest.de>
+* @access public
+* @package Export
+*/
+// +---------------------------------------------------------------------------+
+// This file is part of Stud.IP
+// oscar.inc.php
+//
+// Copyright (c) 2002 Arne Schroeder <schroeder@data-quest.de>
+// Suchi & Berg GmbH <info@data-quest.de>
+// +---------------------------------------------------------------------------+
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or any later version.
+// +---------------------------------------------------------------------------+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// +---------------------------------------------------------------------------+
+
+function export_tmp_gc(){
+ $tmp_export = $GLOBALS['TMP_PATH']. '/export/';
+ if(!is_dir($tmp_export)){
+ if(!mkdir($tmp_export)){
+ trigger_error("tmp directory for export ($tmp_export) could not be created",E_USER_WARNING);
+ return false;
+ } else {
+ chmod($tmp_export, 0700);
+ }
+ }
+ if (mt_rand() % 100 < 10){
+ $dir = @dir($tmp_export);
+ if ($dir){
+ while (false !== ($entry = $dir->read())) {
+ // Skip pointers
+ if ($entry == '.' || $entry == '..') {
+ continue;
+ }
+ $file = $tmp_export . '/' . $entry;
+ $now = time();
+ if (@is_file($file) && (($now - filemtime($file)) > 86400)){
+ @unlink($file);
+ }
+ }
+ $dir->close();
+ }
+ }
+}
+?>
diff --git a/lib/export/export_view.inc.php b/lib/export/export_view.inc.php
new file mode 100644
index 0000000..e9605d1
--- /dev/null
+++ b/lib/export/export_view.inc.php
@@ -0,0 +1,110 @@
+<?
+# Lifter002: TODO
+# Lifter007: TODO
+# Lifter003: TODO
+# Lifter010: TODO
+/**
+* Visual presentation of the Export-module.
+*
+* This file outputs the forms, messages and errors to the screen.
+* The HTML-Design and table-Structure for export-pages are part of this file.
+* It is used for any part of the export-module. If $o_mode is "direct" or "passthrough"
+* it writes only the xml-stream or the output-file to the screen.
+*
+* @author Arne Schroeder <schroeder@data.quest.de>
+* @access public
+* @modulegroup export_modules
+* @module export_view
+* @package Export
+*/
+if (($o_mode != "direct") AND ($o_mode != "passthrough"))
+{
+// Start of Output
+ PageLayout::setTitle($export_pagename);
+ Navigation::activateItem('/browse/export');
+ ?>
+<?
+ if (isset($export_error)) {
+ PageLayout::postError($export_error);
+ }
+ if (isset($export_msg)) {
+ PageLayout::postSuccess($export_msg);
+ }
+ if (isset($export_info)) {
+ PageLayout::postInfo($export_info);
+ }
+?>
+ <?
+ echo $export_pagecontent;
+
+ if (isset($xml_printlink))
+ {
+ ?>
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
+ <tr>
+ <?
+ printhead ("99%", FALSE, "", "open", true, ' ' . $xml_printimage, $xml_printlink, $xml_printdesc);
+ ?>
+ </tr>
+ </table>
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
+ <tr>
+ <?
+ printcontent("99%", FALSE, $xml_printcontent, "");
+ ?>
+ </tr>
+ </table>
+ <?
+ }
+ if (isset($xslt_printlink))
+ {
+ ?>
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
+ <tr>
+ <?
+ printhead ("99%", FALSE, "", "open", true, ' ' . $xslt_printimage, $xslt_printlink, $xslt_printdesc);
+ ?>
+ </tr>
+ </table>
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
+ <tr>
+ <?
+ printcontent("99%", FALSE, $xslt_printcontent, "");
+ ?>
+ </tr>
+ </table>
+ <?
+ }
+ if (isset($result_printlink))
+ {
+ ?>
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
+ <tr>
+ <?
+ printhead ("99%", FALSE, "", "open", true, ' ' . $result_printimage, $result_printlink, $result_printdesc);
+ ?>
+ </tr>
+ </table>
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
+ <tr>
+ <?
+ printcontent("99%", FALSE, $result_printcontent, "");
+ ?>
+ </tr>
+ </table>
+ <br>
+ <?
+ }
+ if (isset($export_weiter_button))
+ {
+ echo $export_weiter_button;
+ }
+ ?>
+
+<?php
+}
+elseif ($export_error_num > 0)
+{
+ echo $export_error;
+}
+?>
diff --git a/lib/export/export_xml.inc.php b/lib/export/export_xml.inc.php
new file mode 100644
index 0000000..bdc2e9c
--- /dev/null
+++ b/lib/export/export_xml.inc.php
@@ -0,0 +1,167 @@
+<?
+# Lifter002: TODO
+# Lifter007: TODO
+# Lifter003: TODO
+# Lifter010: TODO
+/**
+* Export-subfile that calls export-functions to create a xml-file.
+*
+* This file call export_range to get a xml-strem with the wanted data.
+* Depending on $o_mode it passes the xml-stream into a file or to the screen.
+*
+* @author Arne Schroeder <schroeder@data.quest.de>
+* @access public
+* @modulegroup export_modules
+* @module export_xml
+* @package Export
+*/
+// +---------------------------------------------------------------------------+
+// This file is part of Stud.IP
+// export_xml.inc.php
+// XML-functions for the Stud.IP database
+//
+// Copyright (c) 2002 Arne Schroeder <schroeder@data-quest.de>
+// Suchi & Berg GmbH <info@data-quest.de>
+// +---------------------------------------------------------------------------+
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or any later version.
+// +---------------------------------------------------------------------------+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// +---------------------------------------------------------------------------+
+
+use Studip\Button, Studip\LinkButton;
+
+if (($o_mode != "direct") AND ($o_mode != "passthrough"))
+ $perm->check("tutor");
+
+$export_pagename = _("Datenexport");
+require_once 'lib/export/export_xml_vars.inc.php'; // XML-Variablen
+require_once 'lib/export/export_xml_func.inc.php'; // XML-Funktionen
+require_once 'lib/export/export_studipdata_func.inc.php'; // Studip-Export-Funktionen
+require_once 'lib/dates.inc.php'; // Datumsfunktionen
+
+/**
+* Checks given parameters
+*
+* This function checks the given parameters. If some are missing
+* it returns false and adds a warning to $export_error.
+*
+* @access public
+* @return boolean
+*/
+function CheckParamXML()
+{
+global $range_id, $ex_type, $xml_file_id, $o_mode, $export_error, $export_error_num, $export_o_modes, $export_ex_types,$ex_person_details,$ex_tstamp,$ex_hash,$perm;
+
+ if ($ex_person_details && $ex_tstamp && !$perm->have_perm('admin')){
+ list($y,$M,$d,$h,$m) = explode('-', $ex_tstamp);
+ $tstamp = mktime($h,$m,0,$M,$d,$y);
+ $hash = md5(Config::get()->UNIZENSUSPLUGIN_SHARED_SECRET1 . $ex_tstamp . Config::get()->UNIZENSUSPLUGIN_SHARED_SECRET2);
+ if ($ex_hash != $hash || $tstamp < (time() - 600)) $ex_person_details = null;
+ }
+
+ if ((($range_id != "") OR ($xml_file_id != "")) AND (in_array($o_mode, $export_o_modes) AND (in_array($ex_type, $export_ex_types))))
+ return true;
+ $export_error .= "<b>" . _("Unzulässiger Seitenaufruf!") . "</b><br>";
+ $export_error_num++;
+ return false;
+}
+
+
+if (!CheckParamXML()) {
+ PageLayout::postError(
+ _('Die Parameter, mit denen diese Seite aufgerufen wurde, sind fehlerhaft.')
+ );
+}
+
+
+if ($ex_sem == 'current'){
+ $ex_sem = Semester::findCurrent()->getId();
+}
+
+if ($o_mode != "direct")
+{
+ if (!(is_dir( $TMP_PATH."/export" )))
+ {
+ mkdir($TMP_PATH . "/export");
+ chmod ($TMP_PATH . "/export", 0777);
+ }
+ $xml_file_id = md5(uniqid(rand())) . ".xml";
+ $xml_file = fopen($TMP_PATH."/" . $xml_file_id, "w");
+}
+
+if ($o_mode == 'direct'){
+ header("Content-type: text/xml; charset=utf-8");
+ if ($export_error_num){
+ echo '<?xml version="1.0"?>' . chr(10);
+ echo xml_tag('studip_export_error_msg', strip_tags($export_error));
+ exit();
+ }
+}
+
+export_range( $range_id );
+
+
+
+if ($o_mode !== "direct") {
+ fclose($xml_file);
+}
+
+if ($o_mode === 'file' || $o_mode === 'choose') {
+
+ if ($object_counter<1) {
+ $xml_export_text = _("Es wurden keine Daten gefunden!");
+ $export_error = _("Es wurden keine Daten gefunden! Die übergebene ID ist mit keinen Veranstaltungs- / Personendaten verbunden.");
+ $export_pagecontent .= "<form class=\"default\"><footer>"
+ . LinkButton::create('<< ' . _('Zurück'), URLHelper::getURL("", ['range_id' => $range_id, 'ex_type' => $ex_type, 'ex_sem' => $ex_sem, 'o_mode' => 'start']))
+ . "</footer></form>";
+ $export_error_num ++;
+
+ } else {
+ $xml_export_text = _("Die Daten wurden erfolgreich exportiert.");
+ if ($object_counter == 1) {
+ $export_msg = sprintf(_("%s Objekt wurde verarbeitet.") . " ", $object_counter);
+ } else {
+ $export_msg = sprintf(_("%s Objekte wurden verarbeitet.") . " ", $object_counter);
+ }
+
+ $export_pagecontent .= "<form class=\"default\" method=\"POST\" action=\"" . URLHelper::getLink() . "\">";
+ $export_pagecontent .= CSRFProtection::tokenTag();
+ $export_pagecontent .= "<input type=\"hidden\" name=\"page\" value=\"2\">";
+ $export_pagecontent .= "<input type=\"hidden\" name=\"format\" value=\"" . htmlReady($format) . "\">";
+ $export_pagecontent .= "<input type=\"hidden\" name=\"o_mode\" value=\"choose\">";
+ $export_pagecontent .= "<input type=\"hidden\" name=\"ex_type\" value=\"" . htmlReady($ex_type) . "\">";
+ $export_pagecontent .= "<input type=\"hidden\" name=\"ex_sem\" value=\"" . htmlReady($ex_sem) . "\">";
+ foreach (array_keys($ex_sem_class) as $semclassid) {
+ $export_pagecontent .= "<input type=\"hidden\" name=\"ex_sem_class[". htmlReady($semclassid) ."]\" value=\"1\">";
+ }
+ $export_pagecontent .= "<input type=\"hidden\" name=\"range_id\" value=\"" . htmlReady($range_id) . "\">";
+ $export_pagecontent .= "<input type=\"hidden\" name=\"xslt_filename\" value=\"" . htmlReady($xslt_filename) . "\">";
+
+ $export_weiter_button = "<footer>" . Button::create('<< ' . _('Zurück'), 'back') . "</footer></form>";
+ $xml_printimage = '<a href="'. FileManager::getDownloadLinkForTemporaryFile($xml_file_id, $xml_filename) . '">';
+ $xml_printimage.= Icon::create($export_icon['xml'], 'clickable');
+ $xml_printimage.= '</a>';
+ $xml_printlink = '<a href="'. FileManager::getDownloadLinkForTemporaryFile($xml_file_id, $xml_filename). '" class="tree">' . htmlReady($xml_filename) . '</a>';
+ $xml_printdesc = _("XML-Daten");
+ $xml_printcontent = _("In dieser Datei sind die Daten als XML-Tags gespeichert. Diese Tags können mit einem XSLT-Script verarbeitet werden.") . "<br>";
+ }
+
+ PageLayout::postInfo($xml_export_text);
+
+ if ($object_counter > 0) {
+ $link = '<a href="'. FileManager::getDownloadLinkForTemporaryFile($xml_file_id, $xml_filename) .' ">';
+ PageLayout::postSuccess(sprintf(
+ _('Um die XML-Datei jetzt herunterzuladen klicken Sie %s hier %s.'),
+ $link, '</a>'
+ ));
+ }
+}
diff --git a/lib/export/export_xml_func.inc.php b/lib/export/export_xml_func.inc.php
new file mode 100644
index 0000000..7b266c6
--- /dev/null
+++ b/lib/export/export_xml_func.inc.php
@@ -0,0 +1,150 @@
+<?
+# Lifter002: TODO
+# Lifter007: TODO
+# Lifter003: TODO
+# Lifter010: TODO
+/**
+* Export xml-functions.
+*
+* In this file there are several functions to generate xml-tags.
+*
+* @author Arne Schroeder <schroeder@data.quest.de>
+* @access public
+* @modulegroup export_modules
+* @module export_xml_functions
+* @package Export
+*/
+// +---------------------------------------------------------------------------+
+// This file is part of Stud.IP
+// export_xml_func.inc.php
+//
+// Copyright (c) 2002 Arne Schroeder <schroeder@data-quest.de>
+// Suchi & Berg GmbH <info@data-quest.de>
+// +---------------------------------------------------------------------------+
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or any later version.
+// +---------------------------------------------------------------------------+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// +---------------------------------------------------------------------------+
+
+
+/**
+* create xml_header
+*
+* This function creates a xml-header for output.
+* Its contents are Name of University, Stud.IP-Version, Range of Export (e.g. "root"), and temporal range.
+*
+* @access public
+* @return string xml-header
+*/
+function xml_header()
+{
+global $SOFTWARE_VERSION, $ex_type, $ex_sem, $range_name, $range_id;
+ $semester = $ex_sem ? Semester::find($ex_sem) : Semester::findCurrent();
+ $xml_tag_string = "<" . "?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
+ $xml_tag_string .= "<studip version=\"" . xml_escape ($SOFTWARE_VERSION) . "\" logo=\"". xml_escape (Assets::image_path('logos/logo2b.png')) . "\"";
+ if ($range_id == "root") $xml_tag_string .= " range=\"" . _("Alle Einrichtungen") . "\"";
+ elseif ($range_name != "") $xml_tag_string .= " range=\"" . xml_escape ($range_name) . "\"";
+ if (Config::get()->UNI_NAME_CLEAN != "") $xml_tag_string .= " uni=\"" . xml_escape (Config::get()->UNI_NAME_CLEAN) . "\"";
+ if ($semester)
+ $xml_tag_string .= " zeitraum=\"" . xml_escape ($semester->name) . "\" semester_id=\"" . xml_escape ($semester->getId()) . "\"";
+ $xml_tag_string .= ">\n";
+ return $xml_tag_string;
+}
+
+/**
+* create opening xml-tag
+*
+* This function creates an open xml-tag.
+* The tag-name is defined by the given parameter $tag_name.
+* An optional parameter allows to set an attribute named "key".
+*
+* @access public
+* @param string tag name
+* @param string value for optional attribute "key"
+* @return string xml open tag
+*/
+function xml_open_tag($tag_name, $tag_key = "")
+{
+ if ($tag_key != "")
+ $xml_tag_string .= " key=\"" . xml_escape ($tag_key ) ."\"" ;
+ $xml_tag_string = "<" . $tag_name . $xml_tag_string . ">\n";
+ return $xml_tag_string;
+}
+
+/**
+* create closing xml-tag
+*
+* This function creates a closed xml-tag.
+* The tag-name is defined by the given parameter $tag_name.
+*
+* @access public
+* @param string tag name
+* @return string xml close tag
+*/
+function xml_close_tag($tag_name)
+{
+ $xml_tag_string = "</" . $tag_name . ">\n";
+ return $xml_tag_string;
+}
+
+/**
+* create xml-tag
+*
+* This function creates a xml-tag.
+* The tag-name is defined by the given parameter $tag_name.
+* The given parameter tag_content is put between open tag and close tag.
+*
+* @access public
+* @param string tag name
+* @param string content for xml-tag
+* @param array array of tag attributes
+* @return string xml tag
+*/
+function xml_tag($tag_name, $tag_content, $tag_attributes = null)
+{
+ if (is_array($tag_attributes)){
+ foreach($tag_attributes as $key => $value){
+ $xml_tag_string .= " $key=\"".xml_escape($value)."\" ";
+ }
+ }
+ $xml_tag_string = "<" . $tag_name . $xml_tag_string . ">"
+ . xml_escape ( $tag_content )
+ . "</" . $tag_name . ">\n";
+ return $xml_tag_string;
+}
+
+/**
+* create xml-footer
+*
+* This function creates the footer for xml output,
+* which is a closing "studip"-tag.
+*
+* @access public
+* @return string xml footer
+*/
+function xml_footer()
+{
+ $xml_tag_string = "</studip>";
+ return $xml_tag_string;
+}
+
+/**
+ * escapes special characters for xml use
+ *
+ * @param string $string the string to escape
+ * @return string
+ */
+function xml_escape($string)
+{
+ $string = preg_replace('/[\x00-\x08\x0b\x0c\x0e-\x1f]/', '', $string);
+ return htmlspecialchars($string, ENT_QUOTES, 'UTF-8');
+}
diff --git a/lib/export/export_xml_vars.inc.php b/lib/export/export_xml_vars.inc.php
new file mode 100644
index 0000000..ce888e3
--- /dev/null
+++ b/lib/export/export_xml_vars.inc.php
@@ -0,0 +1,118 @@
+<?php
+/**
+* Config file for xml-export
+*
+* This file contains several arrays, that define which names will be used for specific xml-tags in the output-file.
+* Changes in this file may cause export-problems if the XSLT-Scripts are not changed either!
+*
+* @author Arne Schroeder <schroeder@data.quest.de>
+* @access public
+* @modulegroup export_modules
+* @module export_xml_vars
+* @package Export
+*/
+
+// Variablen mit den XML-Bezeichnern
+// "TABELLENSPALTE" => "XML-BEZEICHNER"
+$xml_groupnames_fak = [
+ 'group' => 'fakultaeten',
+ 'object' => 'fakultaet'
+];
+
+$xml_names_fak = [
+ 'Name' => 'name'
+];
+
+$xml_groupnames_inst = [
+ 'object' => 'institut',
+ 'childobject' => 'fakultaet',
+ 'childgroup2' => 'datenfelder',
+ 'childobject2' => 'datenfeld'
+];
+
+$xml_names_inst = [
+ 'type' => 'type',
+ 'Name' => 'name',
+ 'Strasse' => 'strasse',
+ 'Plz' => 'plz',
+ 'url' => 'homepage',
+ 'telefon' => 'telefon',
+ 'email' => 'email',
+ 'fax' => 'fax'
+];
+
+$xml_groupnames_lecture = [
+ 'group' => 'seminare',
+ 'subgroup1' => 'gruppe',
+ 'subgroup2' => 'untergruppe',
+ 'object' => 'seminar',
+ 'childgroup1' => 'termine',
+ 'childgroup2' => 'dozenten',
+ 'childobject2' => 'dozent',
+ 'childgroup3' => 'bereiche',
+ 'childgroup3a' => 'lvgruppen',
+ 'childgroup4' => 'datenfelder',
+ 'childobject4' => 'datenfeld'
+];
+
+$xml_names_lecture = [
+ 'Name' => 'titel',
+ 'Untertitel' => 'untertitel',
+ 'status' => 'status',
+ 'Beschreibung' => 'beschreibung',
+ 'ort' => 'raum',
+ 'Sonstiges' => 'sonstiges',
+ 'art' => 'art',
+ 'teilnehmer' => 'teilnehmer',
+ 'admission_turnout' => 'teilnehmerzahl',
+ 'teilnehmer_anzahl_aktuell' => 'teilnehmer_anzahl_aktuell',
+ 'vorrausetzungen' => 'voraussetzung',
+ 'lernorga' => 'lernorga',
+ 'leistungsnachweis' => 'schein',
+ 'VeranstaltungsNummer' => 'veranstaltungsnummer',
+ 'ects' => 'ects',
+ 'bereich' => 'bereich',
+ 'lvgruppe' => 'lvgruppe',
+ 'metadata_dates' => ['vorbesprechung', 'erstertermin', 'termin'],
+ 'Institut_id' => 'heimateinrichtung'
+];
+
+$xml_groupnames_person = [
+ 'group' => 'personen',
+ 'subgroup1' => 'gruppe',
+ 'object' => 'person',
+ 'childgroup1' => 'datenfelder',
+ 'childobject1' => 'datenfeld'
+];
+
+$xml_names_person = [
+ 'title_front' => 'titel',
+ 'Vorname' => 'vorname',
+ 'Nachname' => 'nachname',
+ 'title_rear' => 'titel2',
+ 'username' => 'username',
+ 'geschlecht' => 'geschlecht',
+ 'sprechzeiten' => 'sprechzeiten',
+ 'raum' => 'raum',
+ 'Telefon' => 'telefon',
+ 'Fax' => 'fax',
+ 'Email' => 'email',
+ 'Home' => 'homepage',
+ 'name' => 'statusgruppe',
+ 'privadr' => 'adresse',
+ 'privatnr' => 'privatnummer',
+ 'comment' => 'bemerkung',
+ 'admission_position' => 'position_warteliste',
+ 'registration_date' => 'datum_anmeldung',
+ 'nutzer_studiengaenge' => 'nutzer_studiengaenge'
+];
+
+$xml_groupnames_studiengaenge = [
+ 'group' => 'studiengaenge',
+ 'object' => 'studiengang'
+];
+
+$xml_names_studiengaenge = [
+ 'name' => 'name',
+ 'count' => 'anzahl'
+];
diff --git a/lib/export/export_xslt_vars.inc.php b/lib/export/export_xslt_vars.inc.php
new file mode 100644
index 0000000..7b74a9e
--- /dev/null
+++ b/lib/export/export_xslt_vars.inc.php
@@ -0,0 +1,192 @@
+<?
+# Lifter002: TODO
+# Lifter007: TODO
+# Lifter003: TODO
+# Lifter010: TODO
+/**
+* Config file for xslt-script inclusion
+*
+* This file contains several arrays, that define which xslt-scripts are available to the export-module.
+* To add new designs and file-formats to the export-module, just add a new set of filetype, name,
+* description and format-name to this file.
+*
+* @author Arne Schroeder <schroeder@data.quest.de>
+* @access public
+* @modulegroup export_modules
+* @module export_xml_vars
+* @package Export
+*/
+
+$xslt_files["txt-standard"]["name"] = _("Standardmodul");
+$xslt_files["txt-standard"]["desc"] = _("Standardmodul zur Ausgabe von Personen- oder Veranstaltungsdaten im Textformat. Die Daten werden nur mit Tabulatoren und Bindestrichen formatiert. Die Ausgabe-Datei kann in einer Textverarbeitung bearbeitet werden.");
+$xslt_files["txt-standard"]["file"] = "txt-vp-1.xsl";
+$xslt_files["txt-standard"]["txt"] = true;
+$xslt_files["txt-standard"]["person"] = true;
+$xslt_files["txt-standard"]["veranstaltung"] = true;
+
+$xslt_files["txt-noformat"]["name"] = _("Unformatierte Ausgabe");
+$xslt_files["txt-noformat"]["desc"] = _("Modul zur Ausgabe von Personen- oder Veranstaltungsdaten im Textformat. Die Daten werden nicht formatiert. Die Ausgabe-Datei kann in einer Textverarbeitung bearbeitet werden.");
+$xslt_files["txt-noformat"]["file"] = "txt-vp-2.xsl";
+$xslt_files["txt-noformat"]["txt"] = true;
+$xslt_files["txt-noformat"]["person"] = true;
+$xslt_files["txt-noformat"]["veranstaltung"] = true;
+
+$xslt_files["txt-noformat-2"]["name"] = _("Unformatiert mit Veranstaltungsnummern");
+$xslt_files["txt-noformat-2"]["desc"] = _("Modul zur Ausgabe von Personen- oder Veranstaltungsdaten im Textformat. Die Daten werden nicht formatiert. Es werden auch die Veranstaltungsnummern ausgegeben. Die Ausgabe-Datei kann in einer Textverarbeitung bearbeitet werden.");
+$xslt_files["txt-noformat-2"]["file"] = "txt-v-3.xsl";
+$xslt_files["txt-noformat-2"]["txt"] = true;
+$xslt_files["txt-noformat-2"]["veranstaltung"] = true;
+
+
+
+$xslt_files["html-standard"]["name"] = _("Standardmodul");
+$xslt_files["html-standard"]["desc"] = _("Standardmodul zur Ausgabe von Personen- oder Veranstaltungsdaten als HTML-Seite. Personendaten werden als Tabelle angezeigt. Die Ausgabe-Datei kann in einem Web-Browser angezeigt werden.");
+$xslt_files["html-standard"]["file"] = "html-vp-1.xsl";
+$xslt_files["html-standard"]["htm"] = true;
+$xslt_files["html-standard"]["html"] = true;
+$xslt_files["html-standard"]["person"] = true;
+$xslt_files["html-standard"]["veranstaltung"] = true;
+
+$xslt_files["html-druck"]["name"] = _("Druckmodul");
+$xslt_files["html-druck"]["desc"] = _("Modul zur Ausgabe von Personen- oder Veranstaltungsdaten als HTML-Seite. Es wird eine druckbare HTML-Seite ohne Farben erzeugt. Die Ausgabe-Datei kann in einem Web-Browser angezeigt und ausgedruckt werden.");
+$xslt_files["html-druck"]["file"] = "html-vp-2.xsl";
+$xslt_files["html-druck"]["htm"] = true;
+$xslt_files["html-druck"]["html"] = true;
+$xslt_files["html-druck"]["person"] = true;
+$xslt_files["html-druck"]["veranstaltung"] = true;
+
+$xslt_files["html-liste"]["name"] = _("Übersicht");
+$xslt_files["html-liste"]["desc"] = _("Modul zur Ausgabe von Personen- oder Veranstaltungsdaten als HTML-Seite. Es werden nur die Veranstaltungs-Grunddaten bzw. Namen, Telefonnummern und E-Mail-Adressen in eine Tabelle geschrieben. Die Ausgabe-Datei kann in einem Web-Browser angezeigt werden.");
+$xslt_files["html-liste"]["file"] = "html-vp-3.xsl";
+$xslt_files["html-liste"]["htm"] = true;
+$xslt_files["html-liste"]["html"] = true;
+$xslt_files["html-liste"]["person"] = true;
+$xslt_files["html-liste"]["veranstaltung"] = true;
+
+$xslt_files["html-standard-2"]["name"] = _("Standardmodul mit Veranstaltungsnummern");
+$xslt_files["html-standard-2"]["desc"] = _("Standardmodul zur Ausgabe von Veranstaltungsdaten als HTML-Seite. Es werden auch die Veranstaltungsnummern ausgegeben. Die Ausgabe-Datei kann in einem Web-Browser angezeigt werden.");
+$xslt_files["html-standard-2"]["file"] = "html-v-4.xsl";
+$xslt_files["html-standard-2"]["htm"] = true;
+$xslt_files["html-standard-2"]["html"] = true;
+$xslt_files["html-standard-2"]["veranstaltung"] = true;
+
+$xslt_files["html-teiln"]["name"] = _("Teilnehmendenliste");
+$xslt_files["html-teiln"]["desc"] = _("Modul zur Ausgabe von Personendaten als HTML-Seite. Es werden die Grunddaten der Teilnehmenden einer einzelnen Veranstaltung in eine Tabelle geschrieben. Die Ausgabe-Datei kann in einem Web-Browser angezeigt werden.");
+$xslt_files["html-teiln"]["file"] = "html-t-1.xsl";
+$xslt_files["html-teiln"]["htm"] = true;
+$xslt_files["html-teiln"]["html"] = true;
+//$xslt_files["html-teiln"]["person"] = true;
+
+
+
+$xslt_files["rtf-standard"]["name"] = _("Standardmodul");
+$xslt_files["rtf-standard"]["desc"] = _("Standardmodul zur Ausgabe von Personen- oder Veranstaltungsdaten als RTF-Datei. Die Ausgabe-Datei kann in einer Textverarbeitung bearbeitet werden.");
+$xslt_files["rtf-standard"]["file"] = "rtf-vp-1.xsl";
+$xslt_files["rtf-standard"]["rtf"] = true;
+$xslt_files["rtf-standard"]["person"] = true;
+$xslt_files["rtf-standard"]["veranstaltung"] = true;
+
+$xslt_files["rtf-liste"]["name"] = _("Übersicht");
+$xslt_files["rtf-liste"]["desc"] = _("Modul zur Ausgabe von Personen- oder Veranstaltungsdaten als RTF-Datei. Es werden nur die Grunddaten in eine Tabelle geschrieben (Lehrende, Titel, Status, Termin und Raum bzw.Name, Telefon, Sprechzeiten, Raum, E-Mail). Ein Deckblatt wird automatisch erzeugt. Die Ausgabe-Datei kann in einer Textverarbeitung bearbeitet werden.");
+$xslt_files["rtf-liste"]["file"] = "rtf-vp-2.xsl";
+$xslt_files["rtf-liste"]["rtf"] = true;
+$xslt_files["rtf-liste"]["person"] = true;
+$xslt_files["rtf-liste"]["veranstaltung"] = true;
+
+$xslt_files["rtf-kommentar"]["name"] = _("Vorlesungskommentar");
+$xslt_files["rtf-kommentar"]["desc"] = _("Modul zur Ausgabe von Veranstaltungsdaten als Vorlesungskommentar im Rich-Text-Format. Der Kommentar enthält die Veranstaltungsdetails. Es wird automatisch ein Deckblatt generiert. Die Ausgabe-Datei kann in einer Textverarbeitung bearbeitet werden.");
+$xslt_files["rtf-kommentar"]["file"] = "rtf-vp-3.xsl";
+$xslt_files["rtf-kommentar"]["rtf"] = true;
+$xslt_files["rtf-kommentar"]["veranstaltung"] = true;
+
+$xslt_files["rtf-kommentar-2"]["name"] = _("Vorlesungskommentar mit Veranstaltungsnummern");
+$xslt_files["rtf-kommentar-2"]["desc"] = _("Modul zur Ausgabe von Veranstaltungsdaten als Vorlesungskommentar im Rich-Text-Format. Der Kommentar enthält die Veranstaltungs-Details. Es wird automatisch ein Deckblatt generiert. Die Ausgabe-Datei kann in einer Textverarbeitung bearbeitet werden.");
+$xslt_files["rtf-kommentar-2"]["file"] = "rtf-v-4.xsl";
+$xslt_files["rtf-kommentar-2"]["rtf"] = true;
+$xslt_files["rtf-kommentar-2"]["veranstaltung"] = true;
+
+$xslt_files["rtf-teiln"]["name"] = _("Teilnehmendenliste");
+$xslt_files["rtf-teiln"]["desc"] = _("Modul zur Ausgabe von Personendaten als RTF-Datei. Personendaten inkl. Studiengänge und Kontingente werden in eine Tabelle geschrieben. Die Ausgabe-Datei kann in einer Textverarbeitung bearbeitet werden.");
+$xslt_files["rtf-teiln"]["file"] = "rtf-t-1.xsl";
+$xslt_files["rtf-teiln"]["rtf"] = true;
+
+$xslt_files["rtf-gruppen"]["name"] = _("Liste der Guppen und Funktionen");
+$xslt_files["rtf-gruppen"]["desc"] = _("Modul zur Ausgabe von Personendaten als RTF-Datei. Personendaten werden in eine Tabelle geschrieben. Die Ausgabe-Datei kann in einer Textverarbeitung bearbeitet werden.");
+$xslt_files["rtf-gruppen"]["file"] = "rtf-t-2.xsl";
+$xslt_files["rtf-gruppen"]["rtf"] = true;
+
+$xslt_files["rtf-warteliste"]["name"] = _("Warteliste");
+$xslt_files["rtf-warteliste"]["desc"] = _("Modul zur Ausgabe von Personendaten als RTF-Datei. Personen der Warteliste einer einzelnen Veranstaltung in eine Tabelle geschrieben. Es werden auch die Kontingente und Studiengänge ausgegeben. Die Ausgabe-Datei kann in einer Textverarbeitung bearbeitet werden.");
+$xslt_files["rtf-warteliste"]["file"] = "rtf-t-3.xsl";
+$xslt_files["rtf-warteliste"]["rtf"] = true;
+
+$xslt_files["pdf-standard"]["name"] = _("Standardmodul");
+$xslt_files["pdf-standard"]["desc"] = _("Standardmodul zur Ausgabe von Veranstaltungs- und Personendaten als Vorlesungskommentar bzw. MitarbeiterInnenlisten mit Seitenzahlen im Adobe PDF-Format. Die Datei kann mit dem Acrobat PDF-Reader gelesen werden.");
+$xslt_files["pdf-standard"]["file"] = "pdf-vp-1.xsl";
+$xslt_files["pdf-standard"]["fo"] = true;
+$xslt_files["pdf-standard"]["person"] = true;
+$xslt_files["pdf-standard"]["veranstaltung"] = true;
+
+$xslt_files["pdf-kommentar"]["name"] = _("Vorlesungskommentar");
+$xslt_files["pdf-kommentar"]["desc"] = _("Modul zur Ausgabe von Veranstaltungsdaten als Vorlesungskommentar im Adobe PDF-Format. Die Seiten enthalten eine Kopfzeile und eine Fußzeile mit der Seitenzahl. Deckblatt und Inhaltsverzeichnis werden automatisch generiert. Die Datei kann mit dem Acrobat PDF-Reader gelesen werden.");
+$xslt_files["pdf-kommentar"]["file"] = "pdf-vp-2.xsl";
+$xslt_files["pdf-kommentar"]["fo"] = true;
+$xslt_files["pdf-kommentar"]["veranstaltung"] = true;
+
+$xslt_files["pdf-kommentar-2"]["name"] = _("Vorlesungskommentar mit Veranstaltungsnummern");
+$xslt_files["pdf-kommentar-2"]["desc"] = _("Modul zur Ausgabe von Veranstaltungsdaten als Vorlesungskommentar im Adobe PDF-Format. Die Seiten enthalten eine Kopfzeile und eine Fußzeile mit der Seitenzahl. Deckblatt und Inhaltsverzeichnis werden automatisch generiert. Es werden auch die Veranstaltungsnummern ausgegeben. Die Datei kann mit dem Acrobat PDF-Reader gelesen werden.");
+$xslt_files["pdf-kommentar-2"]["file"] = "pdf-v-4.xsl";
+$xslt_files["pdf-kommentar-2"]["fo"] = true;
+$xslt_files["pdf-kommentar-2"]["veranstaltung"] = true;
+
+$xslt_files["pdf-staff"]["name"] = _("MitarbeiterInnenlisten");
+$xslt_files["pdf-staff"]["desc"] = _("Modul zur Ausgabe von Personendaten als MitarbeiterInnenlisten im Adobe PDF-Format. Die Grunddaten der Personen (Name, Telefon, Sprechzeiten, Raum, E-Mail-Adresse) werden in einer Tabelle angezeigt. Die Seiten enthalten eine Kopfzeile und eine Fußzeile mit der Seitenzahl. Es wird automatisch ein Deckblatt und ein Inhaltsverzeichnis generiert. Die Datei kann mit dem PDF-Acrobat Reader gelesen werden.");
+$xslt_files["pdf-staff"]["file"] = "pdf-vp-2.xsl";
+$xslt_files["pdf-staff"]["fo"] = true;
+$xslt_files["pdf-staff"]["person"] = true;
+
+$xslt_files["pdf-liste"]["name"] = _("Vorlesungsverzeichnis");
+$xslt_files["pdf-liste"]["desc"] = _("Modul zur Ausgabe von Veranstaltungsdaten als Vorlesungsverzeichnis im Adobe PDF-Format. Die Grunddaten der Veranstaltungen (Lehrende, Titel, Status, erster Termin und Raum) werden in einer Tabelle angezeigt. Es wird automatisch ein Deckblatt und ein Inhaltsverzeichnis generiert. Die Datei kann mit dem Acrobat Reader gelesen werden.");
+$xslt_files["pdf-liste"]["file"] = "pdf-v-3.xsl";
+$xslt_files["pdf-liste"]["fo"] = true;
+
+$xslt_files["csv-teiln"]["name"] = _("Teilnehmendenliste");
+$xslt_files["csv-teiln"]["desc"] = _("Modul zur Ausgabe von Personendaten als CSV-Datei. Es werden die Grunddaten der Personen in eine Tabelle geschrieben. Es werden auch die Kontingente und Studiengänge ausgegeben. Die Ausgabe-Datei kann in Excel bearbeitet werden.");
+$xslt_files["csv-teiln"]["file"] = "csv-t-1.xsl";
+$xslt_files["csv-teiln"]["csv"] = true;
+
+$xslt_files["csv-warteliste"]["name"] = _("Warteliste");
+$xslt_files["csv-warteliste"]["desc"] = _("Modul zur Ausgabe von Personendaten als CSV-Datei. Es werden die Grunddaten der Personen auf der Warteliste einer einzelnen Veranstaltung in eine Tabelle geschrieben. Es werden auch die Kontingente und Studiengänge ausgegeben. Die Ausgabe-Datei kann in Excel bearbeitet werden.");
+$xslt_files["csv-warteliste"]["file"] = "csv-t-2.xsl";
+$xslt_files["csv-warteliste"]["csv"] = true;
+
+$xslt_files["csv-gruppen"]["name"] = _("Liste der Teilnehmenden mit Gruppen");
+$xslt_files["csv-gruppen"]["desc"] = _("Modul zur Ausgabe von Personendaten mit Gruppenzugehörigkeit als CSV-Datei. Es werden die Grunddaten der Teilnehmenden einer einzelnen Veranstaltung in eine Tabelle geschrieben. Es werden auch die Kontingente und Studiengänge ausgegeben. Die Ausgabe-Datei kann in Excel bearbeitet werden.");
+$xslt_files["csv-gruppen"]["file"] = "csv-t-3.xsl";
+$xslt_files["csv-gruppen"]["csv"] = true;
+
+$xslt_files["csv-person"]["name"] = _("Standardmodul");
+$xslt_files["csv-person"]["desc"] = _("Standardmodul zur Ausgabe von Personendaten als CSV-Datei. Die Ausgabe-Datei kann in Excel oder OpenOffice angezeigt werden.");
+$xslt_files["csv-person"]["file"] = "csv-p-1.xsl";
+$xslt_files["csv-person"]["csv"] = true;
+$xslt_files["csv-person"]["person"] = true;
+
+$xslt_files["csv-person-2"]["name"] = _("Übersicht");
+$xslt_files["csv-person-2"]["desc"] = _("Modul zur Ausgabe von Personendaten als CSV-Datei. Es werden nur Name, Telefonnummern und E-Mail-Adressen gespeichert. Die Ausgabe-Datei kann in Excel oder OpenOffice angezeigt werden.");
+$xslt_files["csv-person-2"]["file"] = "csv-p-2.xsl";
+$xslt_files["csv-person-2"]["csv"] = true;
+$xslt_files["csv-person-2"]["person"] = true;
+
+$xslt_files["csv-veranstaltung"]["name"] = _("Standardmodul");
+$xslt_files["csv-veranstaltung"]["desc"] = _("Standardmodul zur Ausgabe von Veranstaltungsdaten als CSV-Datei. Die Ausgabe-Datei kann in Excel oder OpenOffice angezeigt werden.");
+$xslt_files["csv-veranstaltung"]["file"] = "csv-v-1.xsl";
+$xslt_files["csv-veranstaltung"]["csv"] = true;
+$xslt_files["csv-veranstaltung"]["veranstaltung"] = true;
+
+$xslt_files["csv-veranstaltung-2"]["name"] = _("Übersicht");
+$xslt_files["csv-veranstaltung-2"]["desc"] = _("Modul zur Ausgabe von Veranstaltungsdaten als CSV-Datei. Die Ausgabe-Datei kann in Excel oder OpenOffice angezeigt werden.");
+$xslt_files["csv-veranstaltung-2"]["file"] = "csv-v-2.xsl";
+$xslt_files["csv-veranstaltung-2"]["csv"] = true;
+$xslt_files["csv-veranstaltung-2"]["veranstaltung"] = true;
+
+?>
diff --git a/lib/export/html-t-1.xsl b/lib/export/html-t-1.xsl
new file mode 100644
index 0000000..6453cd7
--- /dev/null
+++ b/lib/export/html-t-1.xsl
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <xsl:output method="html" encoding="UTF-8"/>
+ <xsl:template match="/">
+ <html>
+ <meta charset="utf-8"/>
+ <body>
+ <xsl:for-each select="studip">
+ <h1>Veranstaltung: <xsl:value-of select="@range"/></h1>
+ <xsl:for-each select="institut">
+ <br/>
+ <xsl:if test="personen">
+ <table width="100%" cellpadding="5" cellspacing="2">
+ <tr colspan="5">
+ <td>
+ <h2>Teilnehmendenliste</h2>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#006699">
+ <b>
+ <font color="#FFFFFF">Name</font>
+ </b>
+ </td>
+ <td bgcolor="#006699">
+ <b>
+ <font color="#FFFFFF">Telefon</font>
+ </b>
+ </td>
+ <td bgcolor="#006699">
+ <b>
+ <font color="#FFFFFF">Adresse</font>
+ </b>
+ </td>
+ <td bgcolor="#006699">
+ <b>
+ <font color="#FFFFFF">E-Mail</font>
+ </b>
+ </td>
+ </tr>
+ <xsl:choose>
+ <xsl:when test="personen/gruppe">
+ <xsl:for-each select="personen/gruppe">
+ <tr>
+ <td colspan="4" bgcolor="#006699">
+ <font color="#FFFFFF">
+ <b>
+ <xsl:value-of select="@key"/>
+ </b>
+ </font>
+ </td>
+ </tr>
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="personen">
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </table>
+ </xsl:if>
+ <br/>
+ <br/>
+ </xsl:for-each>
+ <font size="-1">Generiert von Stud.IP Version <xsl:value-of select="@version"/></font>
+ </xsl:for-each>
+ </body>
+ </html>
+ </xsl:template>
+
+<xsl:template name="showperson">
+ <xsl:for-each select="person">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <xsl:if test="titel">
+ <xsl:value-of select="titel"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="vorname"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="nachname"/>
+ <xsl:if test="titel2">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="titel2"/>
+ </xsl:if>
+ <br/>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:if test="privadr">
+ <xsl:value-of select="privadr"/>
+ </xsl:if>
+ <br/>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:if test="privatnr">
+ <xsl:value-of select="privatnr"/>
+ </xsl:if>
+ <br/>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:if test="email">
+ <xsl:value-of select="email"/>
+ </xsl:if>
+ <br/>
+ </td>
+ </tr>
+ </xsl:for-each>
+</xsl:template>
+</xsl:stylesheet>
diff --git a/lib/export/html-v-4.xsl b/lib/export/html-v-4.xsl
new file mode 100644
index 0000000..0dcf61b
--- /dev/null
+++ b/lib/export/html-v-4.xsl
@@ -0,0 +1,380 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <xsl:output method="html" encoding="UTF-8"/>
+ <xsl:template match="/">
+ <html>
+ <meta charset="utf-8"/>
+ <body>
+ <xsl:for-each select="studip">
+ <xsl:for-each select="institut">
+ <h1><xsl:choose>
+ <xsl:when test="type"><xsl:value-of select="type"/></xsl:when>
+ <xsl:otherwise>Einrichtung</xsl:otherwise>
+</xsl:choose>: <xsl:value-of select="name"/>
+ </h1>
+<xsl:if test="fakultaet">
+ <b>Fakultät: </b>
+ <xsl:value-of select="fakultaet"/>
+ <br/>
+</xsl:if>
+<xsl:if test="homepage">
+ <b>Homepage: </b>
+ <xsl:value-of select="homepage"/>
+ <br/>
+</xsl:if>
+<xsl:if test="strasse">
+ <b>Strasse: </b>
+ <xsl:value-of select="strasse"/>
+ <br/>
+</xsl:if>
+<xsl:if test="plz">
+ <b>Postleitzahl: </b>
+ <xsl:value-of select="plz"/>
+ <br/>
+</xsl:if>
+<xsl:if test="telefon">
+ <b>Telefon: </b>
+ <xsl:value-of select="telefon"/>
+ <br/>
+</xsl:if>
+<xsl:if test="fax">
+ <b>Fax: </b>
+ <xsl:value-of select="fax"/>
+ <br/>
+</xsl:if>
+<xsl:if test="email">
+ <b>E-mail: </b>
+ <xsl:value-of select="email"/>
+ <br/>
+</xsl:if>
+<xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <b><xsl:value-of select="@key"/>: </b>
+ <xsl:value-of select="."/>
+ <br/>
+ </xsl:for-each>
+</xsl:if>
+ <br/>
+ <xsl:if test="seminare">
+ <table width="100%" cellpadding="5" cellspacing="2">
+ <tr>
+ <td>
+ <h2>Veranstaltungen</h2>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <br/>
+ </td>
+ </tr>
+ <xsl:choose>
+ <xsl:when test="seminare/gruppe">
+ <xsl:for-each select="seminare/gruppe">
+ <tr bgcolor="#0000BB">
+ <td colspan="2" bgcolor="#006699">
+ <h2>
+ <font color="#FFFFFF">
+ <b>
+ <xsl:value-of select="@key"/>
+ </b>
+ </font>
+ </h2>
+ </td>
+ </tr>
+ <xsl:choose>
+ <xsl:when test="untergruppe">
+ <xsl:for-each select="untergruppe">
+ <tr bgcolor="#6600BB">
+ <td colspan="2" bgcolor="#006699">
+ <h2>
+ <font color="#FFFFFF">
+ <b>
+ <xsl:value-of select="@key"/>
+ </b>
+ </font>
+ </h2>
+ </td>
+ </tr>
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="showseminar"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminare">
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </table>
+ </xsl:if>
+ <br/>
+ <br/>
+ </xsl:for-each>
+ <font size="-1">Generiert von Stud.IP Version <xsl:value-of select="@version"/></font>
+ </xsl:for-each>
+ </body>
+ </html>
+ </xsl:template>
+
+<xsl:template name="showseminar">
+ <xsl:for-each select="seminar">
+ <tr border="0" align="left">
+ <td bgcolor="#006699">
+ <font color="#FFFFFF">
+ <b>
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ </b>
+ </font>
+ </td>
+ <td bgcolor="#006699">
+ <font color="#FFFFFF">
+ <b>
+ <xsl:value-of select="titel"/>
+ </b>
+ </font>
+ </td>
+ </tr>
+ <xsl:if test="untertitel">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Untertitel: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="untertitel"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Lehrende: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Termin: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="termine/termin"/>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Erster Termin: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="termine/erstertermin"/>
+ </td>
+ </tr>
+ <xsl:if test="termine/vorbesprechung">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Vorbesprechung: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="termine/vorbesprechung"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="status">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Status: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="status"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="veranstaltungsnummer">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Veranstaltungsnummer: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="veranstaltungsnummer"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="beschreibung">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Beschreibung: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:call-template name="replace-newlines">
+ <xsl:with-param name="str" select="beschreibung"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="raum">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Raum: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="raum"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="sonstiges">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Sonstiges: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="sonstiges"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="art">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Art der Veranstaltung: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="art"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="teilnehmer">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Teilnahme: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="teilnehmer"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="teilnehmerzahl">
+ <xsl:for-each select="teilnehmerzahl">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b><xsl:value-of select="@key"/> Anzahl Teilnehmende: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="."/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="voraussetzung">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Voraussetzungen: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="voraussetzung"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="lernorga">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Lernorganisation: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="lernorga"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="schein">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Leistungsnachweis: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="schein"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="ects">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>ECTS: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="ects"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="bereiche">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Bereich: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:for-each select="bereiche/bereich">
+ <xsl:value-of select="."/><br/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="lvgruppen">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Module: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:for-each select="lvgruppen/lvgruppe">
+ <xsl:value-of select="."/><br/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b><xsl:value-of select="@key"/>: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="."/>
+ <br/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </xsl:if>
+ <tr>
+ <td>
+ <br/>
+ </td>
+ </tr>
+ </xsl:for-each>
+</xsl:template>
+ <!-- replace newline characters with <br> elements -->
+ <xsl:template name="replace-newlines">
+ <xsl:param name="str"/>
+ <xsl:choose>
+ <xsl:when test="contains($str, '&#10;')">
+ <xsl:value-of select="substring-before($str, '&#10;')"/>
+ <br/>
+ <xsl:call-template name="replace-newlines">
+ <xsl:with-param name="str" select="substring-after($str, '&#10;')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$str"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/lib/export/html-vp-1.xsl b/lib/export/html-vp-1.xsl
new file mode 100644
index 0000000..dd8e0ed
--- /dev/null
+++ b/lib/export/html-vp-1.xsl
@@ -0,0 +1,478 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <xsl:output method="html" encoding="UTF-8"/>
+ <xsl:template match="/">
+ <html>
+ <meta charset="utf-8"/>
+ <body>
+ <xsl:for-each select="studip">
+ <xsl:for-each select="institut">
+ <h1><xsl:choose>
+ <xsl:when test="type"><xsl:value-of select="type"/></xsl:when>
+ <xsl:otherwise>Einrichtung</xsl:otherwise>
+</xsl:choose>: <xsl:value-of select="name"/>
+ </h1>
+<xsl:if test="fakultaet">
+ <b>Fakultät: </b>
+ <xsl:value-of select="fakultaet"/>
+ <br/>
+</xsl:if>
+<xsl:if test="homepage">
+ <b>Homepage: </b>
+ <xsl:value-of select="homepage"/>
+ <br/>
+</xsl:if>
+<xsl:if test="strasse">
+ <b>Strasse: </b>
+ <xsl:value-of select="strasse"/>
+ <br/>
+</xsl:if>
+<xsl:if test="plz">
+ <b>Postleitzahl: </b>
+ <xsl:value-of select="plz"/>
+ <br/>
+</xsl:if>
+<xsl:if test="telefon">
+ <b>Telefon: </b>
+ <xsl:value-of select="telefon"/>
+ <br/>
+</xsl:if>
+<xsl:if test="fax">
+ <b>Fax: </b>
+ <xsl:value-of select="fax"/>
+ <br/>
+</xsl:if>
+<xsl:if test="email">
+ <b>E-mail: </b>
+ <xsl:value-of select="email"/>
+ <br/>
+</xsl:if>
+<xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <b><xsl:value-of select="@key"/>: </b>
+ <xsl:value-of select="."/>
+ <br/>
+ </xsl:for-each>
+</xsl:if>
+ <br/>
+ <xsl:if test="seminare">
+ <table width="100%" cellpadding="5" cellspacing="2">
+ <tr>
+ <td>
+ <h2>Veranstaltungen</h2>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <br/>
+ </td>
+ </tr>
+ <xsl:choose>
+ <xsl:when test="seminare/gruppe">
+ <xsl:for-each select="seminare/gruppe">
+ <tr bgcolor="#0000BB">
+ <td colspan="2" bgcolor="#006699">
+ <h2>
+ <font color="#FFFFFF">
+ <b>
+ <xsl:value-of select="@key"/>
+ </b>
+ </font>
+ </h2>
+ </td>
+ </tr>
+ <xsl:choose>
+ <xsl:when test="untergruppe">
+ <xsl:for-each select="untergruppe">
+ <tr bgcolor="#6600BB">
+ <td colspan="2" bgcolor="#006699">
+ <h2>
+ <font color="#FFFFFF">
+ <b>
+ <xsl:value-of select="@key"/>
+ </b>
+ </font>
+ </h2>
+ </td>
+ </tr>
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="showseminar"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminare">
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </table>
+ </xsl:if>
+ <xsl:if test="personen">
+ <table width="100%" cellpadding="5" cellspacing="2">
+ <tr colspan="5">
+ <td>
+ <h2>MitarbeiterInnen</h2>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#006699">
+ <b>
+ <font color="#FFFFFF">Name</font>
+ </b>
+ </td>
+ <td bgcolor="#006699">
+ <b>
+ <font color="#FFFFFF">Telefon</font>
+ </b>
+ </td>
+ <td bgcolor="#006699">
+ <b>
+ <font color="#FFFFFF">Raum</font>
+ </b>
+ </td>
+ <td bgcolor="#006699">
+ <b>
+ <font color="#FFFFFF">Sprechzeiten</font>
+ </b>
+ </td>
+ <td bgcolor="#006699">
+ <b>
+ <font color="#FFFFFF">E-Mail</font>
+ </b>
+ </td>
+ </tr>
+ <xsl:choose>
+ <xsl:when test="personen/gruppe">
+ <xsl:for-each select="personen/gruppe">
+ <tr>
+ <td colspan="5" bgcolor="#006699">
+ <font color="#FFFFFF">
+ <b>
+ <xsl:value-of select="@key"/>
+ </b>
+ </font>
+ </td>
+ </tr>
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="personen">
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </table>
+ </xsl:if>
+ <br/>
+ <br/>
+ </xsl:for-each>
+ <font size="-1">Generiert von Stud.IP Version <xsl:value-of select="@version"/></font>
+ </xsl:for-each>
+ </body>
+ </html>
+ </xsl:template>
+
+<xsl:template name="showperson">
+ <xsl:for-each select="person">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <xsl:if test="titel">
+ <xsl:value-of select="titel"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="vorname"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="nachname"/>
+ <xsl:if test="titel2">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="titel2"/>
+ </xsl:if>
+ <br/>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:if test="telefon">
+ <xsl:value-of select="telefon"/>
+ </xsl:if>
+ <br/>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:if test="raum">
+ <xsl:value-of select="raum"/>
+ </xsl:if>
+ <br/>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:if test="sprechzeiten">
+ <xsl:value-of select="sprechzeiten"/>
+ </xsl:if>
+ <br/>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:if test="email">
+ <xsl:value-of select="email"/>
+ </xsl:if>
+ <br/>
+ </td>
+ </tr>
+ </xsl:for-each>
+</xsl:template>
+
+
+<xsl:template name="showseminar">
+ <xsl:for-each select="seminar">
+ <tr border="0" align="left">
+ <td bgcolor="#006699">
+ <font color="#FFFFFF">
+ <b>
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ </b>
+ </font>
+ </td>
+ <td bgcolor="#006699">
+ <font color="#FFFFFF">
+ <b>
+ <xsl:value-of select="titel"/>
+ </b>
+ </font>
+ </td>
+ </tr>
+ <xsl:if test="untertitel">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Untertitel: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="untertitel"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Lehrende: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Termin: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="termine/termin"/>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Erster Termin: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="termine/erstertermin"/>
+ </td>
+ </tr>
+ <xsl:if test="termine/vorbesprechung">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Vorbesprechung: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="termine/vorbesprechung"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="status">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Status: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="status"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="beschreibung">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Beschreibung: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:call-template name="replace-newlines">
+ <xsl:with-param name="str" select="beschreibung"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="raum">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Raum: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="raum"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="sonstiges">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Sonstiges: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="sonstiges"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="art">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Art der Veranstaltung: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="art"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="teilnehmer">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Teilnahme: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="teilnehmer"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="teilnehmerzahl">
+ <xsl:for-each select="teilnehmerzahl">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b><xsl:value-of select="@key"/> Anzahl Teilnehmende: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="."/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="voraussetzung">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Voraussetzungen: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="voraussetzung"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="lernorga">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Lernorganisation: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="lernorga"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="schein">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Leistungsnachweis: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="schein"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="ects">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>ECTS: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="ects"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="bereiche">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Bereich: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:for-each select="bereiche/bereich">
+ <xsl:value-of select="."/><br/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="lvgruppen">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b>Module: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:for-each select="lvgruppen/lvgruppe">
+ <xsl:value-of select="."/><br/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <b><xsl:value-of select="@key"/>: </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="."/>
+ <br/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </xsl:if>
+ <tr>
+ <td>
+ <br/>
+ </td>
+ </tr>
+ </xsl:for-each>
+</xsl:template>
+ <!-- replace newline characters with <br> elements -->
+ <xsl:template name="replace-newlines">
+ <xsl:param name="str"/>
+ <xsl:choose>
+ <xsl:when test="contains($str, '&#10;')">
+ <xsl:value-of select="substring-before($str, '&#10;')"/>
+ <br/>
+ <xsl:call-template name="replace-newlines">
+ <xsl:with-param name="str" select="substring-after($str, '&#10;')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$str"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/lib/export/html-vp-2.xsl b/lib/export/html-vp-2.xsl
new file mode 100644
index 0000000..8743569
--- /dev/null
+++ b/lib/export/html-vp-2.xsl
@@ -0,0 +1,473 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <xsl:output method="html" encoding="UTF-8"/>
+ <xsl:template match="/">
+ <html>
+ <meta charset="utf-8"/>
+ <body>
+ <xsl:for-each select="studip">
+ <xsl:for-each select="institut">
+ <h1><xsl:choose>
+ <xsl:when test="type"><xsl:value-of select="type"/></xsl:when>
+ <xsl:otherwise>Einrichtung</xsl:otherwise>
+</xsl:choose>: <xsl:value-of select="name"/>
+ </h1>
+<xsl:if test="fakultaet">
+ <b>Fakultät: </b>
+ <xsl:value-of select="fakultaet"/>
+ <br/>
+</xsl:if>
+<xsl:if test="homepage">
+ <b>Homepage: </b>
+ <xsl:value-of select="homepage"/>
+ <br/>
+</xsl:if>
+<xsl:if test="strasse">
+ <b>Strasse: </b>
+ <xsl:value-of select="strasse"/>
+ <br/>
+</xsl:if>
+<xsl:if test="plz">
+ <b>Postleitzahl: </b>
+ <xsl:value-of select="plz"/>
+ <br/>
+</xsl:if>
+<xsl:if test="telefon">
+ <b>Telefon: </b>
+ <xsl:value-of select="telefon"/>
+ <br/>
+</xsl:if>
+<xsl:if test="fax">
+ <b>Fax: </b>
+ <xsl:value-of select="fax"/>
+ <br/>
+</xsl:if>
+<xsl:if test="email">
+ <b>E-mail: </b>
+ <xsl:value-of select="email"/>
+ <br/>
+</xsl:if>
+<xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <b><xsl:value-of select="@key"/>: </b>
+ <xsl:value-of select="."/>
+ <br/>
+ </xsl:for-each>
+</xsl:if>
+ <br/>
+ <xsl:if test="seminare">
+ <table width="100%" cellpadding="5" cellspacing="0" border="1">
+ <tr>
+ <td colspan="2">
+ <h2>Veranstaltungen</h2>
+ </td>
+ </tr>
+ <xsl:choose>
+ <xsl:when test="seminare/gruppe">
+ <xsl:for-each select="seminare/gruppe">
+ <tr bgcolor="#FFFFFF">
+ <td colspan="2">
+ <h2>
+ <font color="#000000">
+ <b>
+ <xsl:value-of select="@key"/>
+ </b>
+ </font>
+ </h2>
+ </td>
+ </tr>
+ <xsl:choose>
+ <xsl:when test="untergruppe">
+ <xsl:for-each select="untergruppe">
+ <tr bgcolor="#FFFFFF">
+ <td colspan="2">
+ <h3>
+ <font color="#000000">
+ <b>
+ <xsl:value-of select="@key"/>
+ </b>
+ </font>
+ </h3>
+ </td>
+ </tr>
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="showseminar"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminare">
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </table>
+ </xsl:if>
+ <xsl:if test="personen">
+ <table width="100%" cellpadding="5" cellspacing="0" border="1">
+ <tr>
+ <td colspan="5">
+ <h2>MitarbeiterInnen</h2>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="5">
+ <br/>
+ </td>
+ </tr>
+ <tr bgcolor="#FFFFFF">
+ <td>
+ <b>
+ <font color="#000000">Name</font>
+ </b>
+ </td>
+ <td>
+ <b>
+ <font color="#000000">Telefon</font>
+ </b>
+ </td>
+ <td>
+ <b>
+ <font color="#000000">Raum</font>
+ </b>
+ </td>
+ <td>
+ <b>
+ <font color="#000000">Sprechzeiten</font>
+ </b>
+ </td>
+ <td>
+ <b>
+ <font color="#000000">E-Mail</font>
+ </b>
+ </td>
+ </tr>
+ <xsl:choose>
+ <xsl:when test="personen/gruppe">
+ <xsl:for-each select="personen/gruppe">
+ <tr bgcolor="#FFFFFF">
+ <td colspan="5">
+ <font color="#000000">
+ <h2>
+ <xsl:value-of select="@key"/>
+ </h2>
+ </font>
+ </td>
+ </tr>
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="personen">
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </table>
+ </xsl:if>
+ <br/>
+ <br/>
+ </xsl:for-each>
+ <font size="-1">Generiert von Stud.IP Version <xsl:value-of select="@version"/></font>
+ </xsl:for-each>
+ </body>
+ </html>
+ </xsl:template>
+
+<xsl:template name="showperson">
+ <xsl:for-each select="person">
+ <tr>
+ <td>
+ <xsl:if test="titel">
+ <xsl:value-of select="titel"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="vorname"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="nachname"/>
+ <xsl:if test="titel2">
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="titel2"/>
+ </xsl:if>
+ <br/>
+ </td>
+ <td>
+ <xsl:if test="telefon">
+ <xsl:value-of select="telefon"/>
+ </xsl:if>
+ <br/>
+ </td>
+ <td>
+ <xsl:if test="raum">
+ <xsl:value-of select="raum"/>
+ </xsl:if>
+ <br/>
+ </td>
+ <td>
+ <xsl:if test="sprechzeiten">
+ <xsl:value-of select="sprechzeiten"/>
+ </xsl:if>
+ <br/>
+ </td>
+ <td>
+ <xsl:if test="email">
+ <xsl:value-of select="email"/>
+ </xsl:if>
+ <br/>
+ </td>
+ </tr>
+ </xsl:for-each>
+</xsl:template>
+
+
+<xsl:template name="showseminar">
+ <xsl:for-each select="seminar">
+ <tr bgcolor="#FFFFFF" border="0" align="left">
+ <td>
+ <font color="#000000">
+ <b>
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ </b>
+ </font>
+ </td>
+ <td>
+ <font color="#000000">
+ <b>
+ <xsl:value-of select="titel"/>
+ </b>
+ </font>
+ </td>
+ </tr>
+ <xsl:if test="untertitel">
+ <tr>
+ <td>
+ <b>Untertitel: </b>
+ </td>
+ <td>
+ <xsl:value-of select="untertitel"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <tr>
+ <td>
+ <b>Lehrende: </b>
+ </td>
+ <td>
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b>Termin: </b>
+ </td>
+ <td>
+ <xsl:value-of select="termine/termin"/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b>Erster Termin: </b>
+ </td>
+ <td>
+ <xsl:value-of select="termine/erstertermin"/>
+ </td>
+ </tr>
+ <xsl:if test="termine/vorbesprechung">
+ <tr>
+ <td>
+ <b>Vorbesprechung: </b>
+ </td>
+ <td>
+ <xsl:value-of select="termine/vorbesprechung"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="status">
+ <tr>
+ <td>
+ <b>Status: </b>
+ </td>
+ <td>
+ <xsl:value-of select="status"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="beschreibung">
+ <tr>
+ <td>
+ <b>Beschreibung: </b>
+ </td>
+ <td>
+ <xsl:call-template name="replace-newlines">
+ <xsl:with-param name="str" select="beschreibung"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="raum">
+ <tr>
+ <td>
+ <b>Raum: </b>
+ </td>
+ <td>
+ <xsl:value-of select="raum"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="sonstiges">
+ <tr>
+ <td>
+ <b>Sonstiges: </b>
+ </td>
+ <td>
+ <xsl:value-of select="sonstiges"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="art">
+ <tr>
+ <td>
+ <b>Art der Veranstaltung: </b>
+ </td>
+ <td>
+ <xsl:value-of select="art"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="teilnehmer">
+ <tr>
+ <td>
+ <b>Teilnahme: </b>
+ </td>
+ <td>
+ <xsl:value-of select="teilnehmer"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="teilnehmerzahl">
+ <xsl:for-each select="teilnehmerzahl">
+ <tr>
+ <td>
+ <b><xsl:value-of select="@key"/> Anzahl Teilnehmende: </b>
+ </td>
+ <td>
+ <xsl:value-of select="."/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="voraussetzung">
+ <tr>
+ <td>
+ <b>Voraussetzungen: </b>
+ </td>
+ <td>
+ <xsl:value-of select="voraussetzung"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="lernorga">
+ <tr>
+ <td>
+ <b>Lernorganisation: </b>
+ </td>
+ <td>
+ <xsl:value-of select="lernorga"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="schein">
+ <tr>
+ <td>
+ <b>Leistungsnachweis: </b>
+ </td>
+ <td>
+ <xsl:value-of select="schein"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="ects">
+ <tr>
+ <td>
+ <b>ECTS: </b>
+ </td>
+ <td>
+ <xsl:value-of select="ects"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="bereiche">
+ <tr>
+ <td>
+ <b>Bereich: </b>
+ </td>
+ <td>
+ <xsl:for-each select="bereiche/bereich">
+ <xsl:value-of select="."/><br/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="lvgruppen">
+ <tr>
+ <td>
+ <b>Module: </b>
+ </td>
+ <td>
+ <xsl:for-each select="lvgruppen/lvgruppe">
+ <xsl:value-of select="."/><br/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <tr>
+ <td>
+ <b><xsl:value-of select="@key"/>: </b>
+ </td>
+ <td>
+ <xsl:value-of select="."/>
+ <br/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </xsl:if>
+ <tr>
+ <td colspan="2">
+ <br/>
+ </td>
+ </tr>
+ </xsl:for-each>
+</xsl:template>
+ <!-- replace newline characters with <br> elements -->
+ <xsl:template name="replace-newlines">
+ <xsl:param name="str"/>
+ <xsl:choose>
+ <xsl:when test="contains($str, '&#10;')">
+ <xsl:value-of select="substring-before($str, '&#10;')"/>
+ <br/>
+ <xsl:call-template name="replace-newlines">
+ <xsl:with-param name="str" select="substring-after($str, '&#10;')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$str"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/lib/export/html-vp-3.xsl b/lib/export/html-vp-3.xsl
new file mode 100644
index 0000000..5d500c6
--- /dev/null
+++ b/lib/export/html-vp-3.xsl
@@ -0,0 +1,265 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <xsl:output method="html" encoding="UTF-8"/>
+ <xsl:template match="/">
+ <html>
+ <meta charset="utf-8"/>
+ <body>
+ <xsl:for-each select="studip">
+ <xsl:for-each select="institut">
+ <h1><xsl:choose>
+ <xsl:when test="type"><xsl:value-of select="type"/></xsl:when>
+ <xsl:otherwise>Einrichtung</xsl:otherwise>
+</xsl:choose>: <xsl:value-of select="name"/>
+ </h1>
+<xsl:if test="fakultaet">
+ <b>Fakultät: </b>
+ <xsl:value-of select="fakultaet"/>
+ <br/>
+</xsl:if>
+<xsl:if test="homepage">
+ <b>Homepage: </b>
+ <xsl:value-of select="homepage"/>
+ <br/>
+</xsl:if>
+<xsl:if test="strasse">
+ <b>Strasse: </b>
+ <xsl:value-of select="strasse"/>
+ <br/>
+</xsl:if>
+<xsl:if test="plz">
+ <b>Postleitzahl: </b>
+ <xsl:value-of select="plz"/>
+ <br/>
+</xsl:if>
+<xsl:if test="telefon">
+ <b>Telefon: </b>
+ <xsl:value-of select="telefon"/>
+ <br/>
+</xsl:if>
+<xsl:if test="fax">
+ <b>Fax: </b>
+ <xsl:value-of select="fax"/>
+ <br/>
+</xsl:if>
+<xsl:if test="email">
+ <b>E-mail: </b>
+ <xsl:value-of select="email"/>
+ <br/>
+</xsl:if>
+<xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <b><xsl:value-of select="@key"/>: </b>
+ <xsl:value-of select="."/>
+ <br/>
+ </xsl:for-each>
+</xsl:if>
+ <br/>
+ <xsl:if test="seminare">
+ <table width="100%" cellpadding="5" cellspacing="2">
+ <tr>
+ <td>
+ <h2>Veranstaltungen</h2>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td width="20%" bgcolor="#006699">
+ <b>
+ <font color="#FFFFFF">Lehrende</font>
+ </b>
+ </td>
+ <td width="35%" bgcolor="#006699">
+ <b>
+ <font color="#FFFFFF">Veranstaltung</font>
+ </b>
+ </td>
+ <td width="20%" bgcolor="#006699">
+ <b>
+ <font color="#FFFFFF">Status</font>
+ </b>
+ </td>
+ <td width="15%" bgcolor="#006699">
+ <b>
+ <font color="#FFFFFF">Termin</font>
+ </b>
+ </td>
+ <td width="10%" bgcolor="#006699">
+ <b>
+ <font color="#FFFFFF">Raum</font>
+ </b>
+ </td>
+ </tr>
+ <xsl:choose>
+ <xsl:when test="seminare/gruppe">
+ <xsl:for-each select="seminare/gruppe">
+ <tr bgcolor="#0000BB">
+ <td colspan="5">
+ <h2>
+ <font color="#FFFFFF">
+ <b>
+ <xsl:value-of select="@key"/>
+ </b>
+ </font>
+ </h2>
+ </td>
+ </tr>
+ <xsl:choose>
+ <xsl:when test="untergruppe">
+ <xsl:for-each select="untergruppe">
+ <tr bgcolor="#6600BB">
+ <td colspan="5">
+ <h2>
+ <font color="#FFFFFF">
+ <b>
+ <xsl:value-of select="@key"/>
+ </b>
+ </font>
+ </h2>
+ </td>
+ </tr>
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="showseminar"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminare">
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </table>
+ </xsl:if>
+ <xsl:if test="personen">
+ <table width="100%" cellpadding="5" cellspacing="2">
+ <tr colspan="3">
+ <td>
+ <h2>MitarbeiterInnen</h2>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#006699">
+ <b>
+ <font color="#FFFFFF">Name</font>
+ </b>
+ </td>
+ <td bgcolor="#006699">
+ <b>
+ <font color="#FFFFFF">Telefon</font>
+ </b>
+ </td>
+ <td bgcolor="#006699">
+ <b>
+ <font color="#FFFFFF">E-Mail</font>
+ </b>
+ </td>
+ </tr>
+ <xsl:choose>
+ <xsl:when test="personen/gruppe">
+ <xsl:for-each select="personen/gruppe">
+ <tr bgcolor="#006699">
+ <td colspan="3">
+ <font color="#FFFFFF">
+ <b>
+ <xsl:value-of select="@key"/>
+ </b>
+ </font>
+ </td>
+ </tr>
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="personen">
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </table>
+ </xsl:if>
+ <br/>
+ <br/>
+ </xsl:for-each>
+ <font size="-1">Generiert von Stud.IP Version <xsl:value-of select="@version"/></font>
+ </xsl:for-each>
+ </body>
+ </html>
+ </xsl:template>
+
+<xsl:template name="showperson">
+ <xsl:for-each select="person">
+ <tr>
+ <td bgcolor="#EEEEEE">
+ <xsl:if test="titel">
+ <xsl:value-of select="titel"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="vorname"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="nachname"/>
+ <xsl:if test="titel2">
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="titel2"/>
+ </xsl:if>
+ <br/>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:if test="telefon">
+ <xsl:value-of select="telefon"/>
+ </xsl:if>
+ <br/>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:if test="email">
+ <xsl:value-of select="email"/>
+ </xsl:if>
+ <br/>
+ </td>
+ </tr>
+ </xsl:for-each>
+</xsl:template>
+
+
+<xsl:template name="showseminar">
+ <xsl:for-each select="seminar">
+ <tr border="0" align="left">
+ <td bgcolor="#EEEEEE">
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <b>
+ <xsl:value-of select="titel"/>
+ </b>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="status"/>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="termine/termin"/>
+ </td>
+ <td bgcolor="#EEEEEE">
+ <xsl:value-of select="raum"/>
+ </td>
+ </tr>
+ </xsl:for-each>
+</xsl:template>
+</xsl:stylesheet>
diff --git a/lib/export/oscar.php b/lib/export/oscar.php
new file mode 100644
index 0000000..ce0ab0e
--- /dev/null
+++ b/lib/export/oscar.php
@@ -0,0 +1,40 @@
+<?
+# Lifter002: TODO
+# Lifter007: TODO
+# Lifter003: TODO
+# Lifter010: TODO
+/**
+* Tool to delete old files in the tmp-directory.
+*
+* This file checks the tmp-directory for old files an deletes them.
+*
+* @author Arne Schroeder <schroeder@data.quest.de>
+* @access public
+* @modulegroup export_modules
+* @module oscar
+* @package Export
+*/
+// +---------------------------------------------------------------------------+
+// This file is part of Stud.IP
+// oscar.inc.php
+//
+// Copyright (c) 2002 Arne Schroeder <schroeder@data-quest.de>
+// Suchi & Berg GmbH <info@data-quest.de>
+// +---------------------------------------------------------------------------+
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or any later version.
+// +---------------------------------------------------------------------------+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// +---------------------------------------------------------------------------+
+
+require_once ("export_tmp_gc.inc.php");
+export_tmp_gc();
+?> \ No newline at end of file
diff --git a/lib/export/pdf-v-3.xsl b/lib/export/pdf-v-3.xsl
new file mode 100644
index 0000000..43d04e1
--- /dev/null
+++ b/lib/export/pdf-v-3.xsl
@@ -0,0 +1,422 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <xsl:output method="xml"/>
+ <xsl:template match="/">
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="cover" page-height="29.7cm" page-width="21cm" margin-top="0.5cm" margin-bottom="0.5cm" margin-left="1cm" margin-right="0.5cm">
+ <fo:region-body margin-top="3cm"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="leftPage" page-height="29.7cm" page-width="21cm" margin-left="0.5cm" margin-right="1.5cm" margin-top="0.5cm" margin-bottom="0.5cm">
+ <fo:region-body margin-top="2.5cm" margin-bottom="2.5cm"/>
+ <fo:region-before extent="2cm"/>
+ <fo:region-after extent="2cm"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="rightPage" page-height="29.7cm" page-width="21cm" margin-left="1.5cm" margin-right="0.5cm" margin-top="0.5cm" margin-bottom="0.5cm">
+ <fo:region-body margin-top="2.5cm" margin-bottom="2.5cm"/>
+ <fo:region-before extent="2cm"/>
+ <fo:region-after extent="2cm"/>
+ </fo:simple-page-master>
+ <fo:page-sequence-master master-name="contents">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference master-reference="leftPage" odd-or-even="even"/>
+ <fo:conditional-page-master-reference master-reference="rightPage" odd-or-even="odd"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="cover">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block font-family="Helvetica" font-size="36pt" text-align="center">
+Vorlesungskommentar
+ </fo:block>
+ <xsl:for-each select="studip">
+ <fo:block font-family="Helvetica" font-size="24pt" text-align="center" space-after="17cm">
+ <xsl:value-of select="@range"/>
+ </fo:block>
+ <fo:block text-align="center" font-family="Helvetica" font-size="20pt">
+ <xsl:value-of select="@zeitraum"/>
+ </fo:block>
+ <fo:block text-align="center" font-family="Helvetica" font-size="18pt">
+ <xsl:value-of select="@uni"/>
+ </fo:block>
+ <fo:block text-align="right" font-family="Helvetica" font-size="10pt">
+ Generiert von Stud.IP Version <xsl:value-of select="@version"/>
+ </fo:block>
+ </xsl:for-each>
+ </fo:flow>
+ </fo:page-sequence>
+ <fo:page-sequence master-reference="contents" initial-page-number="2">
+ <fo:static-content flow-name="xsl-region-before">
+ <fo:block font-family="Helvetica" font-size="10pt" text-align="center" border-style="solid" border-color="black">
+ Inhaltsverzeichnis
+ </fo:block>
+ </fo:static-content>
+ <fo:static-content flow-name="xsl-region-after">
+ <fo:block font-family="Helvetica" font-size="10pt" text-align="center">
+ Seite <fo:page-number/>
+ </fo:block>
+ </fo:static-content>
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block text-align="justify">
+ <fo:block font-size="14pt">
+ <fo:inline font-weight="bold">Inhaltsverzeichnis</fo:inline>
+ </fo:block>
+ <xsl:for-each select="studip/institut">
+ <fo:block space-after="10pt">
+ </fo:block>
+ <fo:block font-size="12pt" text-align-last="justify">
+ <fo:inline font-weight="bold">
+ <xsl:value-of select="name"/>
+ <fo:leader leader-pattern="space"/>
+ <fo:page-number-citation ref-id="{generate-id()}"/>
+ </fo:inline>
+ </fo:block>
+ <xsl:choose>
+ <xsl:when test="seminare/gruppe">
+ <xsl:for-each select="seminare/gruppe">
+ <fo:block font-size="10pt" text-align-last="justify">
+ <fo:inline font-weight="bold">
+ <xsl:value-of select="@key"/>
+ <fo:leader leader-pattern="space"/>
+ <fo:page-number-citation ref-id="{generate-id()}"/>
+ </fo:inline>
+ </fo:block>
+ <xsl:choose>
+ <xsl:when test="untergruppe">
+ <xsl:for-each select="untergruppe">
+ <fo:block font-size="10pt" text-align-last="justify">
+ <fo:inline font-weight="bold">
+ <xsl:value-of select="@key"/>
+ <fo:leader leader-pattern="space"/>
+ <fo:page-number-citation ref-id="{generate-id()}"/>
+ </fo:inline>
+ </fo:block>
+ <xsl:for-each select="seminar">
+ <fo:block font-size="10pt" text-align-last="justify">
+ <xsl:value-of select="titel"/>
+ <fo:leader leader-pattern="space"/>
+ <fo:page-number-citation ref-id="{generate-id()}"/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminar">
+ <fo:block font-size="10pt">
+ <xsl:value-of select="titel"/>
+ <fo:leader leader-pattern="space"/>
+ <fo:page-number-citation ref-id="{generate-id()}"/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminare/seminar">
+ <fo:block font-size="10pt">
+ <xsl:value-of select="titel"/>
+ <fo:leader leader-pattern="space"/>
+ <fo:page-number-citation ref-id="{generate-id()}"/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ <xsl:for-each select="studip/institut">
+ <fo:page-sequence master-reference="contents">
+ <fo:static-content flow-name="xsl-region-before">
+ <fo:block font-family="Helvetica" font-size="10pt" text-align="center" border-style="solid" border-color="black">
+ Vorlesungskommentar
+ </fo:block>
+ </fo:static-content>
+ <fo:static-content flow-name="xsl-region-after">
+ <fo:block font-family="Helvetica" font-size="10pt" text-align="center">
+ Seite <fo:page-number/>
+ </fo:block>
+ </fo:static-content>
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block text-align="left" font-size="12pt" id="{generate-id()}">
+ <fo:block text-align="center" font-size="16pt" space-after="10pt">
+ <fo:inline font-weight="bold">
+ <xsl:value-of select="name"/>
+ </fo:inline>
+ </fo:block>
+<xsl:if test="fakultaet">
+ <fo:block>
+ <fo:inline font-weight="bold">Fakult&#228;t: </fo:inline>
+ <xsl:value-of select="fakultaet"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="homepage">
+ <fo:block>
+ <fo:inline font-weight="bold">Homepage: </fo:inline>
+ <xsl:value-of select="homepage"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="strasse">
+ <fo:block>
+ <fo:inline font-weight="bold">Strasse: </fo:inline>
+ <xsl:value-of select="strasse"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="plz">
+ <fo:block>
+ <fo:inline font-weight="bold">Postleitzahl: </fo:inline>
+ <xsl:value-of select="plz"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="telefon">
+ <fo:block>
+ <fo:inline font-weight="bold">Telefon: </fo:inline>
+ <xsl:value-of select="telefon"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="fax">
+ <fo:block>
+ <fo:inline font-weight="bold">Fax: </fo:inline>
+ <xsl:value-of select="fax"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="email">
+ <fo:block>
+ <fo:inline font-weight="bold">E-mail: </fo:inline>
+ <xsl:value-of select="email"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <fo:block>
+ <fo:inline font-weight="bold"><xsl:value-of select="@key"/>: </fo:inline>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+</xsl:if>
+ <fo:block space-after="12pt">
+ </fo:block>
+ <xsl:if test="seminare">
+ <fo:block text-align="center" font-size="14pt" space-after="10pt">
+ Veranstaltungen
+</fo:block>
+<fo:block>
+<fo:table border-style="solid" border-color="black" table-layout="fixed">
+ <fo:table-column column-number="1" column-width="5cm" border-after-style="solid" border-after-color="black"/>
+ <fo:table-column column-number="2" column-width="3cm" border-after-style="solid" border-after-color="black"/>
+ <fo:table-column column-number="3" column-width="2.5cm" border-after-style="solid" border-after-color="black"/>
+ <fo:table-column column-number="4" column-width="4cm" border-after-style="solid" border-after-color="black"/>
+ <fo:table-column column-number="5" column-width="4cm" border-after-style="solid" border-after-color="black"/>
+ <fo:table-header>
+ <fo:table-row>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block>Name</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block>Telefon</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block>Raum</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block>Sprechzeiten</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block>E-Mail</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-body>
+ <xsl:choose>
+ <xsl:when test="seminare/gruppe">
+ <xsl:for-each select="seminare/gruppe">
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block id="{generate-id()}">
+<fo:inline font-weight="bold">
+<xsl:value-of select="@key"/>
+</fo:inline>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <xsl:choose>
+ <xsl:when test="untergruppe">
+ <xsl:for-each select="untergruppe">
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block id="{generate-id()}">
+<fo:inline font-weight="bold">
+<xsl:value-of select="@key"/>
+</fo:inline>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="showseminar"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminare">
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </fo:table-body>
+</fo:table>
+</fo:block>
+ </xsl:if>
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </xsl:for-each>
+ </fo:root>
+ </xsl:template>
+
+ <xsl:template name="showseminar">
+ <xsl:for-each select="seminar">
+ <fo:block text-align="justify" font-size="14pt" border-style="solid" border-color="black" space-after="6pt" id="{generate-id()}">
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>: <xsl:value-of select="titel"/>
+ </fo:block>
+ <xsl:if test="untertitel">
+ <fo:block text-align="justify" font-size="12pt">
+ <fo:inline font-weight="bold">Untertitel: </fo:inline>
+ <xsl:value-of select="untertitel"/>
+ </fo:block>
+ </xsl:if>
+ <fo:block text-align="justify" font-size="12pt">
+ <fo:inline font-weight="bold">Lehrende: </fo:inline>
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ </fo:block>
+ <fo:block>
+ <fo:inline font-weight="bold">Termin: </fo:inline>
+ <xsl:value-of select="termine/termin"/>
+ </fo:block>
+ <fo:block>
+ <fo:inline font-weight="bold">Erster Termin: </fo:inline>
+ <xsl:value-of select="termine/erstertermin"/>
+ </fo:block>
+ <xsl:if test="termine/vorbesprechung">
+ <fo:block>
+ <fo:inline font-weight="bold">Vorbesprechung: </fo:inline>
+ <xsl:value-of select="termine/vorbesprechung"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:text>
+</xsl:text>
+ <xsl:if test="status">
+ <fo:block>
+ <fo:inline font-weight="bold">Status: </fo:inline>
+ <xsl:value-of select="status"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="beschreibung">
+ <fo:block linefeed-treatment="preserve">
+ <fo:inline font-weight="bold">Beschreibung: </fo:inline>
+ <xsl:value-of select="beschreibung"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="raum">
+ <fo:block>
+ <fo:inline font-weight="bold">Raum: </fo:inline>
+ <xsl:value-of select="raum"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="sonstiges">
+ <fo:block>
+ <fo:inline font-weight="bold">Sonstiges: </fo:inline>
+ <xsl:value-of select="sonstiges"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="art">
+ <fo:block>
+ <fo:inline font-weight="bold">Art der Veranstaltung: </fo:inline>
+ <xsl:value-of select="art"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="teilnehmer">
+ <fo:block>
+ <fo:inline font-weight="bold">Teilnahme: </fo:inline>
+ <xsl:value-of select="teilnehmer"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="teilnehmerzahl">
+ <xsl:for-each select="teilnehmerzahl">
+ <fo:block>
+ <fo:inline font-weight="bold"><xsl:value-of select="@key"/> Anzahl Teilnehmende: </fo:inline>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="voraussetzung">
+ <fo:block>
+ <fo:inline font-weight="bold">Voraussetzungen: </fo:inline>
+ <xsl:value-of select="voraussetzung"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="lernorga">
+ <fo:block>
+ <fo:inline font-weight="bold">Lernorganisation: </fo:inline>
+ <xsl:value-of select="lernorga"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="schein">
+ <fo:block>
+ <fo:inline font-weight="bold">Leistungsnachweis: </fo:inline>
+ <xsl:value-of select="schein"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="ects">
+ <fo:block>
+ <fo:inline font-weight="bold">ECTS: </fo:inline>
+ <xsl:value-of select="ects"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="bereiche">
+ <fo:block>
+ <fo:inline font-weight="bold">Bereich: </fo:inline>
+ </fo:block>
+ <xsl:for-each select="bereiche/bereich">
+ <fo:block>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="lvgruppen">
+ <fo:block>
+ <fo:inline font-weight="bold">Module: </fo:inline>
+ </fo:block>
+ <xsl:for-each select="lvgruppen/lvgruppe">
+ <fo:block>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <fo:block>
+ <fo:inline font-weight="bold"><xsl:value-of select="@key"/>: </fo:inline>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:if>
+ <fo:block space-after="12pt">
+</fo:block>
+ </xsl:for-each>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/lib/export/pdf-v-4.xsl b/lib/export/pdf-v-4.xsl
new file mode 100644
index 0000000..10d776d
--- /dev/null
+++ b/lib/export/pdf-v-4.xsl
@@ -0,0 +1,401 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <xsl:output method="xml"/>
+ <xsl:template match="/">
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="cover" page-height="29.7cm" page-width="21cm" margin-top="0.5cm" margin-bottom="0.5cm" margin-left="1cm" margin-right="0.5cm">
+ <fo:region-body margin-top="3cm"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="leftPage" page-height="29.7cm" page-width="21cm" margin-left="0.5cm" margin-right="1.5cm" margin-top="0.5cm" margin-bottom="0.5cm">
+ <fo:region-body margin-top="2.5cm" margin-bottom="2.5cm"/>
+ <fo:region-before extent="2cm"/>
+ <fo:region-after extent="2cm"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="rightPage" page-height="29.7cm" page-width="21cm" margin-left="1.5cm" margin-right="0.5cm" margin-top="0.5cm" margin-bottom="0.5cm">
+ <fo:region-body margin-top="2.5cm" margin-bottom="2.5cm"/>
+ <fo:region-before extent="2cm"/>
+ <fo:region-after extent="2cm"/>
+ </fo:simple-page-master>
+ <fo:page-sequence-master master-name="contents">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference master-reference="leftPage" odd-or-even="even"/>
+ <fo:conditional-page-master-reference master-reference="rightPage" odd-or-even="odd"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="cover">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block font-family="Helvetica" font-size="36pt" text-align="center">
+ <xsl:if test="studip/institut/seminare">
+Vorlesungskommentar
+ </xsl:if>
+ <xsl:if test="studip/institut/personen">
+MitarbeiterInnenliste
+ </xsl:if>
+ </fo:block>
+ <xsl:for-each select="studip">
+ <fo:block font-family="Helvetica" font-size="24pt" text-align="center" space-after="17cm">
+ <xsl:value-of select="@range"/>
+ </fo:block>
+ <fo:block text-align="center" font-family="Helvetica" font-size="20pt">
+ <xsl:value-of select="@zeitraum"/>
+ </fo:block>
+ <fo:block text-align="center" font-family="Helvetica" font-size="18pt">
+ <xsl:value-of select="@uni"/>
+ </fo:block>
+ <fo:block text-align="right" font-family="Helvetica" font-size="10pt">
+ Generiert von Stud.IP Version <xsl:value-of select="@version"/>
+ </fo:block>
+ </xsl:for-each>
+ </fo:flow>
+ </fo:page-sequence>
+ <fo:page-sequence master-reference="contents" initial-page-number="2">
+ <fo:static-content flow-name="xsl-region-before">
+ <fo:block font-family="Helvetica" font-size="10pt" text-align="center" border-style="solid" border-color="black">
+ Inhaltsverzeichnis
+ </fo:block>
+ </fo:static-content>
+ <fo:static-content flow-name="xsl-region-after">
+ <fo:block font-family="Helvetica" font-size="10pt" text-align="center">
+ Seite <fo:page-number/>
+ </fo:block>
+ </fo:static-content>
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block text-align="justify">
+ <fo:block font-size="14pt">
+ <fo:inline font-weight="bold">Inhaltsverzeichnis</fo:inline>
+ </fo:block>
+ <xsl:for-each select="studip/institut">
+ <fo:block space-after="10pt">
+ </fo:block>
+ <fo:block font-size="12pt" text-align-last="justify">
+ <fo:inline font-weight="bold">
+ <xsl:value-of select="name"/>
+ <fo:leader leader-pattern="space"/>
+ <fo:page-number-citation ref-id="{generate-id()}"/>
+ </fo:inline>
+ </fo:block>
+ <xsl:choose>
+ <xsl:when test="seminare/gruppe">
+ <xsl:for-each select="seminare/gruppe">
+ <fo:block font-size="10pt" text-align-last="justify">
+ <fo:inline font-weight="bold">
+ <xsl:value-of select="@key"/>
+ <fo:leader leader-pattern="space"/>
+ <fo:page-number-citation ref-id="{generate-id()}"/>
+ </fo:inline>
+ </fo:block>
+ <xsl:choose>
+ <xsl:when test="untergruppe">
+ <xsl:for-each select="untergruppe">
+ <fo:block font-size="10pt" text-align-last="justify">
+ <fo:inline font-weight="bold">
+ <xsl:value-of select="@key"/>
+ <fo:leader leader-pattern="space"/>
+ <fo:page-number-citation ref-id="{generate-id()}"/>
+ </fo:inline>
+ </fo:block>
+ <xsl:for-each select="seminar">
+ <fo:block font-size="10pt" text-align-last="justify">
+ <xsl:value-of select="titel"/>
+ <fo:leader leader-pattern="space"/>
+ <fo:page-number-citation ref-id="{generate-id()}"/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminar">
+ <fo:block font-size="10pt">
+ <xsl:value-of select="titel"/>
+ <fo:leader leader-pattern="space"/>
+ <fo:page-number-citation ref-id="{generate-id()}"/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminare/seminar">
+ <fo:block font-size="10pt">
+ <xsl:value-of select="titel"/>
+ <fo:leader leader-pattern="space"/>
+ <fo:page-number-citation ref-id="{generate-id()}"/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ <xsl:for-each select="studip/institut">
+ <fo:page-sequence master-reference="contents">
+ <fo:static-content flow-name="xsl-region-before">
+ <fo:block font-family="Helvetica" font-size="10pt" text-align="center" border-style="solid" border-color="black">
+ <xsl:if test="seminare">
+ Vorlesungskommentar
+ </xsl:if>
+ </fo:block>
+ </fo:static-content>
+ <fo:static-content flow-name="xsl-region-after">
+ <fo:block font-family="Helvetica" font-size="10pt" text-align="center">
+ Seite <fo:page-number/>
+ </fo:block>
+ </fo:static-content>
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block text-align="left" font-size="12pt" id="{generate-id()}">
+ <fo:block text-align="center" font-size="16pt" space-after="10pt">
+ <fo:inline font-weight="bold">
+ <xsl:value-of select="name"/>
+ </fo:inline>
+ </fo:block>
+<xsl:if test="fakultaet">
+ <fo:block>
+ <fo:inline font-weight="bold">Fakult&#228;t: </fo:inline>
+ <xsl:value-of select="fakultaet"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="homepage">
+ <fo:block>
+ <fo:inline font-weight="bold">Homepage: </fo:inline>
+ <xsl:value-of select="homepage"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="strasse">
+ <fo:block>
+ <fo:inline font-weight="bold">Strasse: </fo:inline>
+ <xsl:value-of select="strasse"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="plz">
+ <fo:block>
+ <fo:inline font-weight="bold">Postleitzahl: </fo:inline>
+ <xsl:value-of select="plz"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="telefon">
+ <fo:block>
+ <fo:inline font-weight="bold">Telefon: </fo:inline>
+ <xsl:value-of select="telefon"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="fax">
+ <fo:block>
+ <fo:inline font-weight="bold">Fax: </fo:inline>
+ <xsl:value-of select="fax"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="email">
+ <fo:block>
+ <fo:inline font-weight="bold">E-mail: </fo:inline>
+ <xsl:value-of select="email"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <fo:block>
+ <fo:inline font-weight="bold"><xsl:value-of select="@key"/>: </fo:inline>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+</xsl:if>
+ <fo:block space-after="12pt">
+ </fo:block>
+ <xsl:if test="seminare">
+ <fo:block text-align="center" font-size="14pt" space-after="10pt">
+ Veranstaltungen
+</fo:block>
+ <xsl:choose>
+ <xsl:when test="seminare/gruppe">
+ <xsl:for-each select="seminare/gruppe">
+ <fo:block text-align="justify" font-size="16pt" space-after="6pt" id="{generate-id()}">
+ <fo:inline font-weight="bold">
+ <xsl:value-of select="@key"/>
+ </fo:inline>
+ </fo:block>
+ <xsl:choose>
+ <xsl:when test="untergruppe">
+ <xsl:for-each select="untergruppe">
+ <fo:block text-align="justify" font-size="14pt" space-after="6pt" id="{generate-id()}">
+ <fo:inline font-weight="bold">
+ <xsl:value-of select="@key"/>
+ </fo:inline>
+ <fo:block>
+ <xsl:text>
+ </xsl:text>
+ </fo:block>
+ </fo:block>
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="showseminar"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminare">
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </xsl:for-each>
+ </fo:root>
+ </xsl:template>
+
+ <xsl:template name="showseminar">
+ <xsl:for-each select="seminar">
+ <fo:block text-align="justify" font-size="14pt" border-style="solid" border-color="black" space-after="6pt" id="{generate-id()}">
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>: <xsl:value-of select="titel"/>
+ </fo:block>
+ <xsl:if test="untertitel">
+ <fo:block text-align="justify" font-size="12pt">
+ <fo:inline font-weight="bold">Untertitel: </fo:inline>
+ <xsl:value-of select="untertitel"/>
+ </fo:block>
+ </xsl:if>
+ <fo:block text-align="justify" font-size="12pt">
+ <fo:inline font-weight="bold">Lehrende: </fo:inline>
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ </fo:block>
+ <fo:block>
+ <fo:inline font-weight="bold">Termin: </fo:inline>
+ <xsl:value-of select="termine/termin"/>
+ </fo:block>
+ <fo:block>
+ <fo:inline font-weight="bold">Erster Termin: </fo:inline>
+ <xsl:value-of select="termine/erstertermin"/>
+ </fo:block>
+ <xsl:if test="termine/vorbesprechung">
+ <fo:block>
+ <fo:inline font-weight="bold">Vorbesprechung: </fo:inline>
+ <xsl:value-of select="termine/vorbesprechung"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:text>
+</xsl:text>
+ <xsl:if test="status">
+ <fo:block>
+ <fo:inline font-weight="bold">Status: </fo:inline>
+ <xsl:value-of select="status"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="veranstaltungsnummer">
+ <fo:block>
+ <fo:inline font-weight="bold">Veranstaltungsnummer: </fo:inline>
+ <xsl:value-of select="veranstaltungsnummer"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="beschreibung">
+ <fo:block linefeed-treatment="preserve">
+ <fo:inline font-weight="bold">Beschreibung: </fo:inline>
+ <xsl:value-of select="beschreibung"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="raum">
+ <fo:block>
+ <fo:inline font-weight="bold">Raum: </fo:inline>
+ <xsl:value-of select="raum"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="sonstiges">
+ <fo:block>
+ <fo:inline font-weight="bold">Sonstiges: </fo:inline>
+ <xsl:value-of select="sonstiges"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="art">
+ <fo:block>
+ <fo:inline font-weight="bold">Art der Veranstaltung: </fo:inline>
+ <xsl:value-of select="art"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="teilnehmer">
+ <fo:block>
+ <fo:inline font-weight="bold">Teilnahme: </fo:inline>
+ <xsl:value-of select="teilnehmer"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="teilnehmerzahl">
+ <xsl:for-each select="teilnehmerzahl">
+ <fo:block>
+ <fo:inline font-weight="bold"><xsl:value-of select="@key"/> Anzahl Teilnehmende: </fo:inline>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="voraussetzung">
+ <fo:block>
+ <fo:inline font-weight="bold">Voraussetzungen: </fo:inline>
+ <xsl:value-of select="voraussetzung"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="lernorga">
+ <fo:block>
+ <fo:inline font-weight="bold">Lernorganisation: </fo:inline>
+ <xsl:value-of select="lernorga"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="schein">
+ <fo:block>
+ <fo:inline font-weight="bold">Leistungsnachweis: </fo:inline>
+ <xsl:value-of select="schein"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="ects">
+ <fo:block>
+ <fo:inline font-weight="bold">ECTS: </fo:inline>
+ <xsl:value-of select="ects"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="bereiche">
+ <fo:block>
+ <fo:inline font-weight="bold">Bereich: </fo:inline>
+ </fo:block>
+ <xsl:for-each select="bereiche/bereich">
+ <fo:block>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="lvgruppen">
+ <fo:block>
+ <fo:inline font-weight="bold">Module: </fo:inline>
+ </fo:block>
+ <xsl:for-each select="lvgruppen/lvgruppe">
+ <fo:block>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <fo:block>
+ <fo:inline font-weight="bold"><xsl:value-of select="@key"/>: </fo:inline>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:if>
+ <fo:block space-after="12pt">
+</fo:block>
+ </xsl:for-each>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/lib/export/pdf-vp-1.xsl b/lib/export/pdf-vp-1.xsl
new file mode 100644
index 0000000..97f4c8c
--- /dev/null
+++ b/lib/export/pdf-vp-1.xsl
@@ -0,0 +1,406 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <xsl:output method="xml"/>
+ <xsl:template match="/">
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="cover" page-height="29.7cm" page-width="21cm" margin-top="0.5cm" margin-bottom="0.5cm" margin-left="1cm" margin-right="0.5cm">
+ <fo:region-body margin-top="3cm"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="contents" page-height="29.7cm" page-width="21cm" margin-left="2cm" margin-right="2cm" margin-top="0.5cm" margin-bottom="0.5cm">
+ <fo:region-body margin-top="2.5cm" margin-bottom="2.5cm"/>
+ <fo:region-before extent="2cm"/>
+ <fo:region-after extent="2cm"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="cover">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block font-family="Helvetica" font-size="36pt" text-align="center">
+ <xsl:if test="studip/institut/seminare">
+Veranstaltungen
+ </xsl:if>
+ <xsl:if test="studip/institut/personen">
+MitarbeiterInnen
+ </xsl:if>
+ </fo:block>
+ <xsl:for-each select="studip">
+ <fo:block font-family="Helvetica" font-size="24pt" text-align="center" space-after="17cm">
+ <xsl:value-of select="@range"/>
+ </fo:block>
+ <fo:block text-align="center" font-family="Helvetica" font-size="20pt">
+ <xsl:value-of select="@zeitraum"/>
+ </fo:block>
+ <fo:block text-align="center" font-family="Helvetica" font-size="18pt">
+ <xsl:value-of select="@uni"/>
+ </fo:block>
+ <fo:block text-align="right" font-family="Helvetica" font-size="10pt">
+ Generiert von Stud.IP Version <xsl:value-of select="@version"/>
+ </fo:block>
+ </xsl:for-each>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <xsl:for-each select="studip/institut">
+ <fo:page-sequence master-reference="contents">
+ <fo:static-content flow-name="xsl-region-before">
+ <fo:block/>
+ </fo:static-content>
+ <fo:static-content flow-name="xsl-region-after">
+ <fo:block font-family="Helvetica" font-size="10pt" text-align="center">
+ Seite <fo:page-number/>
+ </fo:block>
+ </fo:static-content>
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block text-align="left" font-size="12pt" id="{generate-id()}">
+ <fo:block text-align="center" font-size="16pt" space-after="10pt">
+ <fo:inline font-weight="bold">
+ <xsl:value-of select="name"/>
+ </fo:inline>
+ </fo:block>
+<xsl:if test="fakultaet">
+ <fo:block>
+ <fo:inline font-weight="bold">Fakult&#228;t: </fo:inline>
+ <xsl:value-of select="fakultaet"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="homepage">
+ <fo:block>
+ <fo:inline font-weight="bold">Homepage: </fo:inline>
+ <xsl:value-of select="homepage"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="strasse">
+ <fo:block>
+ <fo:inline font-weight="bold">Strasse: </fo:inline>
+ <xsl:value-of select="strasse"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="plz">
+ <fo:block>
+ <fo:inline font-weight="bold">Postleitzahl: </fo:inline>
+ <xsl:value-of select="plz"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="telefon">
+ <fo:block>
+ <fo:inline font-weight="bold">Telefon: </fo:inline>
+ <xsl:value-of select="telefon"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="fax">
+ <fo:block>
+ <fo:inline font-weight="bold">Fax: </fo:inline>
+ <xsl:value-of select="fax"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="email">
+ <fo:block>
+ <fo:inline font-weight="bold">E-mail: </fo:inline>
+ <xsl:value-of select="email"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <fo:block>
+ <fo:inline font-weight="bold"><xsl:value-of select="@key"/>: </fo:inline>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+</xsl:if>
+ <fo:block space-after="12pt">
+ </fo:block>
+ <xsl:if test="seminare">
+ <fo:block text-align="center" font-size="14pt" space-after="10pt">
+ Veranstaltungen
+</fo:block>
+ <xsl:choose>
+ <xsl:when test="seminare/gruppe">
+ <xsl:for-each select="seminare/gruppe">
+ <fo:block text-align="justify" font-size="16pt" space-after="6pt" id="{generate-id()}">
+ <fo:inline font-weight="bold">
+ <xsl:value-of select="@key"/>
+ </fo:inline>
+ </fo:block>
+ <xsl:choose>
+ <xsl:when test="untergruppe">
+ <xsl:for-each select="untergruppe">
+ <fo:block text-align="justify" font-size="14pt" space-after="6pt" id="{generate-id()}">
+ <fo:inline font-weight="bold">
+ <xsl:value-of select="@key"/>
+ </fo:inline>
+ <fo:block>
+ <xsl:text>
+ </xsl:text>
+ </fo:block>
+ </fo:block>
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="showseminar"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminare">
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="personen">
+ <fo:block text-align="center" font-size="14pt" space-after="10pt">
+ MitarbeiterInnen
+</fo:block>
+<fo:block>
+<fo:table border-style="solid" border-color="black" table-layout="fixed">
+ <fo:table-column column-number="1" column-width="5cm" border-after-style="solid" border-after-color="black"/>
+ <fo:table-column column-number="2" column-width="3cm" border-after-style="solid" border-after-color="black"/>
+ <fo:table-column column-number="3" column-width="2.5cm" border-after-style="solid" border-after-color="black"/>
+ <fo:table-column column-number="4" column-width="4cm" border-after-style="solid" border-after-color="black"/>
+ <fo:table-column column-number="5" column-width="4cm" border-after-style="solid" border-after-color="black"/>
+ <fo:table-header>
+ <fo:table-row>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block>Name</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block>Telefon</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block>Raum</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block>Sprechzeiten</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block>E-Mail</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-body>
+ <xsl:choose>
+ <xsl:when test="personen/gruppe">
+ <xsl:for-each select="personen/gruppe">
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>
+<fo:inline font-weight="bold">
+<xsl:value-of select="@key"/>
+</fo:inline>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="personen">
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </fo:table-body>
+</fo:table>
+</fo:block>
+ </xsl:if>
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </xsl:for-each>
+ </fo:root>
+ </xsl:template>
+
+ <xsl:template name="showperson">
+ <xsl:for-each select="person">
+ <fo:table-row>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block hyphenate="true">
+ <xsl:if test="titel">
+ <xsl:value-of select="titel"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="vorname"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="nachname"/>
+ <xsl:if test="titel2">
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="titel2"/>
+ </xsl:if>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block hyphenate="true">
+ <xsl:if test="telefon">
+ <xsl:value-of select="telefon"/>
+ </xsl:if>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block hyphenate="true">
+ <xsl:if test="raum">
+ <xsl:value-of select="raum"/>
+ </xsl:if>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block hyphenate="true">
+ <xsl:if test="sprechzeiten">
+ <xsl:value-of select="sprechzeiten"/>
+ </xsl:if>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block hyphenate="true">
+ <xsl:if test="email">
+ <xsl:value-of select="email"/>
+ </xsl:if>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="showseminar">
+ <xsl:for-each select="seminar">
+ <fo:block text-align="justify" font-size="14pt" border-style="solid" border-color="black" space-after="6pt" id="{generate-id()}">
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>: <xsl:value-of select="titel"/>
+ </fo:block>
+ <xsl:if test="untertitel">
+ <fo:block text-align="justify" font-size="12pt">
+ <fo:inline font-weight="bold">Untertitel: </fo:inline>
+ <xsl:value-of select="untertitel"/>
+ </fo:block>
+ </xsl:if>
+ <fo:block text-align="justify" font-size="12pt">
+ <fo:inline font-weight="bold">Lehrende: </fo:inline>
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ </fo:block>
+ <fo:block>
+ <fo:inline font-weight="bold">Termin: </fo:inline>
+ <xsl:value-of select="termine/termin"/>
+ </fo:block>
+ <fo:block>
+ <fo:inline font-weight="bold">Erster Termin: </fo:inline>
+ <xsl:value-of select="termine/erstertermin"/>
+ </fo:block>
+ <xsl:if test="termine/vorbesprechung">
+ <fo:block>
+ <fo:inline font-weight="bold">Vorbesprechung: </fo:inline>
+ <xsl:value-of select="termine/vorbesprechung"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:text>
+</xsl:text>
+ <xsl:if test="status">
+ <fo:block>
+ <fo:inline font-weight="bold">Status: </fo:inline>
+ <xsl:value-of select="status"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="beschreibung">
+ <fo:block linefeed-treatment="preserve">
+ <fo:inline font-weight="bold">Beschreibung: </fo:inline>
+ <xsl:value-of select="beschreibung"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="raum">
+ <fo:block>
+ <fo:inline font-weight="bold">Raum: </fo:inline>
+ <xsl:value-of select="raum"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="sonstiges">
+ <fo:block>
+ <fo:inline font-weight="bold">Sonstiges: </fo:inline>
+ <xsl:value-of select="sonstiges"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="art">
+ <fo:block>
+ <fo:inline font-weight="bold">Art der Veranstaltung: </fo:inline>
+ <xsl:value-of select="art"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="teilnehmer">
+ <fo:block>
+ <fo:inline font-weight="bold">Teilnahme: </fo:inline>
+ <xsl:value-of select="teilnehmer"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="teilnehmerzahl">
+ <xsl:for-each select="teilnehmerzahl">
+ <fo:block>
+ <fo:inline font-weight="bold"><xsl:value-of select="@key"/> Anzahl Teilnehmende: </fo:inline>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="voraussetzung">
+ <fo:block>
+ <fo:inline font-weight="bold">Voraussetzungen: </fo:inline>
+ <xsl:value-of select="voraussetzung"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="lernorga">
+ <fo:block>
+ <fo:inline font-weight="bold">Lernorganisation: </fo:inline>
+ <xsl:value-of select="lernorga"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="schein">
+ <fo:block>
+ <fo:inline font-weight="bold">Leistungsnachweis: </fo:inline>
+ <xsl:value-of select="schein"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="ects">
+ <fo:block>
+ <fo:inline font-weight="bold">ECTS: </fo:inline>
+ <xsl:value-of select="ects"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="bereiche">
+ <fo:block>
+ <fo:inline font-weight="bold">Bereich: </fo:inline>
+ </fo:block>
+ <xsl:for-each select="bereiche/bereich">
+ <fo:block>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="lvgruppen">
+ <fo:block>
+ <fo:inline font-weight="bold">Module: </fo:inline>
+ </fo:block>
+ <xsl:for-each select="lvgruppen/lvgruppe">
+ <fo:block>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <fo:block>
+ <fo:inline font-weight="bold"><xsl:value-of select="@key"/>: </fo:inline>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:if>
+ <fo:block space-after="12pt">
+</fo:block>
+ </xsl:for-each>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/lib/export/pdf-vp-2.xsl b/lib/export/pdf-vp-2.xsl
new file mode 100644
index 0000000..06cd5b2
--- /dev/null
+++ b/lib/export/pdf-vp-2.xsl
@@ -0,0 +1,504 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <xsl:output method="xml"/>
+ <xsl:template match="/">
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="cover" page-height="29.7cm" page-width="21cm" margin-top="0.5cm" margin-bottom="0.5cm" margin-left="1cm" margin-right="0.5cm">
+ <fo:region-body margin-top="3cm"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="leftPage" page-height="29.7cm" page-width="21cm" margin-left="0.5cm" margin-right="1.5cm" margin-top="0.5cm" margin-bottom="0.5cm">
+ <fo:region-body margin-top="2.5cm" margin-bottom="2.5cm"/>
+ <fo:region-before extent="2cm"/>
+ <fo:region-after extent="2cm"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="rightPage" page-height="29.7cm" page-width="21cm" margin-left="1.5cm" margin-right="0.5cm" margin-top="0.5cm" margin-bottom="0.5cm">
+ <fo:region-body margin-top="2.5cm" margin-bottom="2.5cm"/>
+ <fo:region-before extent="2cm"/>
+ <fo:region-after extent="2cm"/>
+ </fo:simple-page-master>
+ <fo:page-sequence-master master-name="contents">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference master-reference="leftPage" odd-or-even="even"/>
+ <fo:conditional-page-master-reference master-reference="rightPage" odd-or-even="odd"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="cover">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block font-family="Helvetica" font-size="36pt" text-align="center">
+ <xsl:if test="studip/institut/seminare">
+Vorlesungskommentar
+ </xsl:if>
+ <xsl:if test="studip/institut/personen">
+MitarbeiterInnenliste
+ </xsl:if>
+ </fo:block>
+ <xsl:for-each select="studip">
+ <fo:block font-family="Helvetica" font-size="24pt" text-align="center" space-after="17cm">
+ <xsl:value-of select="@range"/>
+ </fo:block>
+ <fo:block text-align="center" font-family="Helvetica" font-size="20pt">
+ <xsl:value-of select="@zeitraum"/>
+ </fo:block>
+ <fo:block text-align="center" font-family="Helvetica" font-size="18pt">
+ <xsl:value-of select="@uni"/>
+ </fo:block>
+ <fo:block text-align="right" font-family="Helvetica" font-size="10pt">
+ Generiert von Stud.IP Version <xsl:value-of select="@version"/>
+ </fo:block>
+ </xsl:for-each>
+ </fo:flow>
+ </fo:page-sequence>
+ <fo:page-sequence master-reference="contents" initial-page-number="2">
+ <fo:static-content flow-name="xsl-region-before">
+ <fo:block font-family="Helvetica" font-size="10pt" text-align="center" border-style="solid" border-color="black">
+ Inhaltsverzeichnis
+ </fo:block>
+ </fo:static-content>
+ <fo:static-content flow-name="xsl-region-after">
+ <fo:block font-family="Helvetica" font-size="10pt" text-align="center">
+ Seite <fo:page-number/>
+ </fo:block>
+ </fo:static-content>
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block text-align="justify">
+ <fo:block font-size="14pt">
+ <fo:inline font-weight="bold">Inhaltsverzeichnis</fo:inline>
+ </fo:block>
+ <xsl:for-each select="studip/institut">
+ <fo:block space-after="10pt">
+ </fo:block>
+ <fo:block font-size="12pt" text-align-last="justify">
+ <fo:inline font-weight="bold">
+ <xsl:value-of select="name"/>
+ <fo:leader leader-pattern="space"/>
+ <fo:page-number-citation ref-id="{generate-id()}"/>
+ </fo:inline>
+ </fo:block>
+ <xsl:choose>
+ <xsl:when test="seminare/gruppe">
+ <xsl:for-each select="seminare/gruppe">
+ <fo:block font-size="10pt" text-align-last="justify">
+ <fo:inline font-weight="bold">
+ <xsl:value-of select="@key"/>
+ <fo:leader leader-pattern="space"/>
+ <fo:page-number-citation ref-id="{generate-id()}"/>
+ </fo:inline>
+ </fo:block>
+ <xsl:choose>
+ <xsl:when test="untergruppe">
+ <xsl:for-each select="untergruppe">
+ <fo:block font-size="10pt" text-align-last="justify">
+ <fo:inline font-weight="bold">
+ <xsl:value-of select="@key"/>
+ <fo:leader leader-pattern="space"/>
+ <fo:page-number-citation ref-id="{generate-id()}"/>
+ </fo:inline>
+ </fo:block>
+ <xsl:for-each select="seminar">
+ <fo:block font-size="10pt" text-align-last="justify">
+ <xsl:value-of select="titel"/>
+ <fo:leader leader-pattern="space"/>
+ <fo:page-number-citation ref-id="{generate-id()}"/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminar">
+ <fo:block font-size="10pt">
+ <xsl:value-of select="titel"/>
+ <fo:leader leader-pattern="space"/>
+ <fo:page-number-citation ref-id="{generate-id()}"/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminare/seminar">
+ <fo:block font-size="10pt">
+ <xsl:value-of select="titel"/>
+ <fo:leader leader-pattern="space"/>
+ <fo:page-number-citation ref-id="{generate-id()}"/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ <xsl:for-each select="studip/institut">
+ <fo:page-sequence master-reference="contents">
+ <fo:static-content flow-name="xsl-region-before">
+ <fo:block font-family="Helvetica" font-size="10pt" text-align="center" border-style="solid" border-color="black">
+ <xsl:if test="seminare">
+ Vorlesungskommentar
+ </xsl:if>
+ <xsl:if test="personen">
+ MitarbeiterInnenliste
+ </xsl:if>
+ </fo:block>
+ </fo:static-content>
+ <fo:static-content flow-name="xsl-region-after">
+ <fo:block font-family="Helvetica" font-size="10pt" text-align="center">
+ Seite <fo:page-number/>
+ </fo:block>
+ </fo:static-content>
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block text-align="left" font-size="12pt" id="{generate-id()}">
+ <fo:block text-align="center" font-size="16pt" space-after="10pt">
+ <fo:inline font-weight="bold">
+ <xsl:value-of select="name"/>
+ </fo:inline>
+ </fo:block>
+<xsl:if test="fakultaet">
+ <fo:block>
+ <fo:inline font-weight="bold">Fakult&#228;t: </fo:inline>
+ <xsl:value-of select="fakultaet"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="homepage">
+ <fo:block>
+ <fo:inline font-weight="bold">Homepage: </fo:inline>
+ <xsl:value-of select="homepage"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="strasse">
+ <fo:block>
+ <fo:inline font-weight="bold">Strasse: </fo:inline>
+ <xsl:value-of select="strasse"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="plz">
+ <fo:block>
+ <fo:inline font-weight="bold">Postleitzahl: </fo:inline>
+ <xsl:value-of select="plz"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="telefon">
+ <fo:block>
+ <fo:inline font-weight="bold">Telefon: </fo:inline>
+ <xsl:value-of select="telefon"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="fax">
+ <fo:block>
+ <fo:inline font-weight="bold">Fax: </fo:inline>
+ <xsl:value-of select="fax"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="email">
+ <fo:block>
+ <fo:inline font-weight="bold">E-mail: </fo:inline>
+ <xsl:value-of select="email"/>
+ </fo:block>
+</xsl:if>
+<xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <fo:block>
+ <fo:inline font-weight="bold"><xsl:value-of select="@key"/>: </fo:inline>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+</xsl:if>
+ <fo:block space-after="12pt">
+ </fo:block>
+ <xsl:if test="seminare">
+ <fo:block text-align="center" font-size="14pt" space-after="10pt">
+ Veranstaltungen
+</fo:block>
+ <xsl:choose>
+ <xsl:when test="seminare/gruppe">
+ <xsl:for-each select="seminare/gruppe">
+ <fo:block text-align="justify" font-size="16pt" space-after="6pt" id="{generate-id()}">
+ <fo:inline font-weight="bold">
+ <xsl:value-of select="@key"/>
+ </fo:inline>
+ </fo:block>
+ <xsl:choose>
+ <xsl:when test="untergruppe">
+ <xsl:for-each select="untergruppe">
+ <fo:block text-align="justify" font-size="14pt" space-after="6pt" id="{generate-id()}">
+ <fo:inline font-weight="bold">
+ <xsl:value-of select="@key"/>
+ </fo:inline>
+ <fo:block>
+ <xsl:text>
+ </xsl:text>
+ </fo:block>
+ </fo:block>
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="showseminar"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminare">
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="personen">
+ <fo:block text-align="center" font-size="14pt" space-after="10pt">
+ MitarbeiterInnen
+</fo:block>
+<fo:block>
+<fo:table border-style="solid" border-color="black" table-layout="fixed">
+ <fo:table-column column-number="1" column-width="5cm" border-after-style="solid" border-after-color="black"/>
+ <fo:table-column column-number="2" column-width="3cm" border-after-style="solid" border-after-color="black"/>
+ <fo:table-column column-number="3" column-width="2.5cm" border-after-style="solid" border-after-color="black"/>
+ <fo:table-column column-number="4" column-width="4cm" border-after-style="solid" border-after-color="black"/>
+ <fo:table-column column-number="5" column-width="4cm" border-after-style="solid" border-after-color="black"/>
+ <fo:table-header>
+ <fo:table-row>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block>Name</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block>Telefon</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block>Raum</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block>Sprechzeiten</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block>E-Mail</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-body>
+ <xsl:choose>
+ <xsl:when test="personen/gruppe">
+ <xsl:for-each select="personen/gruppe">
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>
+<fo:inline font-weight="bold">
+<xsl:value-of select="@key"/>
+</fo:inline>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="personen">
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </fo:table-body>
+</fo:table>
+</fo:block>
+ </xsl:if>
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </xsl:for-each>
+ </fo:root>
+ </xsl:template>
+
+ <xsl:template name="showperson">
+ <xsl:for-each select="person">
+ <fo:table-row>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block hyphenate="true">
+ <xsl:if test="titel">
+ <xsl:value-of select="titel"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="vorname"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="nachname"/>
+ <xsl:if test="titel2">
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="titel2"/>
+ </xsl:if>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block hyphenate="true">
+ <xsl:if test="telefon">
+ <xsl:value-of select="telefon"/>
+ </xsl:if>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block hyphenate="true">
+ <xsl:if test="raum">
+ <xsl:value-of select="raum"/>
+ </xsl:if>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block hyphenate="true">
+ <xsl:if test="sprechzeiten">
+ <xsl:value-of select="sprechzeiten"/>
+ </xsl:if>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-style="solid" border-color="black">
+ <fo:block hyphenate="true">
+ <xsl:if test="email">
+ <xsl:value-of select="email"/>
+ </xsl:if>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="showseminar">
+ <xsl:for-each select="seminar">
+ <fo:block text-align="justify" font-size="14pt" border-style="solid" border-color="black" space-after="6pt" id="{generate-id()}">
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>: <xsl:value-of select="titel"/>
+ </fo:block>
+ <xsl:if test="untertitel">
+ <fo:block text-align="justify" font-size="12pt">
+ <fo:inline font-weight="bold">Untertitel: </fo:inline>
+ <xsl:value-of select="untertitel"/>
+ </fo:block>
+ </xsl:if>
+ <fo:block text-align="justify" font-size="12pt">
+ <fo:inline font-weight="bold">Lehrende: </fo:inline>
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ </fo:block>
+ <fo:block>
+ <fo:inline font-weight="bold">Termin: </fo:inline>
+ <xsl:value-of select="termine/termin"/>
+ </fo:block>
+ <fo:block>
+ <fo:inline font-weight="bold">Erster Termin: </fo:inline>
+ <xsl:value-of select="termine/erstertermin"/>
+ </fo:block>
+ <xsl:if test="termine/vorbesprechung">
+ <fo:block>
+ <fo:inline font-weight="bold">Vorbesprechung: </fo:inline>
+ <xsl:value-of select="termine/vorbesprechung"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:text>
+</xsl:text>
+ <xsl:if test="status">
+ <fo:block>
+ <fo:inline font-weight="bold">Status: </fo:inline>
+ <xsl:value-of select="status"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="beschreibung">
+ <fo:block linefeed-treatment="preserve">
+ <fo:inline font-weight="bold">Beschreibung: </fo:inline>
+ <xsl:value-of select="beschreibung"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="raum">
+ <fo:block>
+ <fo:inline font-weight="bold">Raum: </fo:inline>
+ <xsl:value-of select="raum"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="sonstiges">
+ <fo:block>
+ <fo:inline font-weight="bold">Sonstiges: </fo:inline>
+ <xsl:value-of select="sonstiges"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="art">
+ <fo:block>
+ <fo:inline font-weight="bold">Art der Veranstaltung: </fo:inline>
+ <xsl:value-of select="art"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="teilnehmer">
+ <fo:block>
+ <fo:inline font-weight="bold">Teilnahme: </fo:inline>
+ <xsl:value-of select="teilnehmer"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="teilnehmerzahl">
+ <xsl:for-each select="teilnehmerzahl">
+ <fo:block>
+ <fo:inline font-weight="bold"><xsl:value-of select="@key"/> Anzahl Teilnehmende: </fo:inline>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="voraussetzung">
+ <fo:block>
+ <fo:inline font-weight="bold">Voraussetzungen: </fo:inline>
+ <xsl:value-of select="voraussetzung"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="lernorga">
+ <fo:block>
+ <fo:inline font-weight="bold">Lernorganisation: </fo:inline>
+ <xsl:value-of select="lernorga"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="schein">
+ <fo:block>
+ <fo:inline font-weight="bold">Leistungsnachweis: </fo:inline>
+ <xsl:value-of select="schein"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="ects">
+ <fo:block>
+ <fo:inline font-weight="bold">ECTS: </fo:inline>
+ <xsl:value-of select="ects"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="bereiche">
+ <fo:block>
+ <fo:inline font-weight="bold">Bereich: </fo:inline>
+ </fo:block>
+ <xsl:for-each select="bereiche/bereich">
+ <fo:block>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="lvgruppen">
+ <fo:block>
+ <fo:inline font-weight="bold">Module: </fo:inline>
+ </fo:block>
+ <xsl:for-each select="lvgruppen/lvgruppe">
+ <fo:block>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <fo:block>
+ <fo:inline font-weight="bold"><xsl:value-of select="@key"/>: </fo:inline>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:if>
+ <fo:block space-after="12pt">
+</fo:block>
+ </xsl:for-each>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/lib/export/rtf-t-1.xsl b/lib/export/rtf-t-1.xsl
new file mode 100644
index 0000000..b91e35b
--- /dev/null
+++ b/lib/export/rtf-t-1.xsl
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <xsl:output method="text" encoding="UTF-8"/>
+ <xsl:template match="/">
+<xsl:text>{\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fnil\fcharset0 Times New Roman;}}
+\viewkind4\uc1\pard</xsl:text>
+
+ <xsl:for-each select="studip">
+ <xsl:text>\par\fs36 Veranstaltung: </xsl:text><xsl:value-of select="@range"/>
+ <xsl:for-each select="institut"><xsl:text>
+\par</xsl:text>
+ <xsl:if test="personen">
+ <xsl:text>
+\par\fs28 Teilnehmendenliste
+\par
+\par\trowd \trgaph70\trleft-70\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
+\brdrs\brdrw10 \cltxlrtb \cellx2233\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx4536\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
+\brdrs\brdrw10 \cltxlrtb \cellx5839\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx6839\pard \nowidctlpar\widctlpar\intbl\adjustright {Name\cell Telefon\cell E-Mail\cell Bemerkung\cell }\pard \nowidctlpar\widctlpar\intbl\adjustright {\row }\pard</xsl:text>
+
+ <xsl:choose>
+ <xsl:when test="personen/gruppe">
+ <xsl:for-each select="personen/gruppe">
+ <xsl:text>
+\trowd \trgaph70\trleft-70\trkeep\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
+\brdrs\brdrw10 \cltxlrtb \cellx6839\pard \nowidctlpar\widctlpar\intbl\adjustright {\b\fs24
+</xsl:text>
+ <xsl:value-of select="@key"/>
+ <xsl:text>\b0\cell }\pard \nowidctlpar\widctlpar\intbl\adjustright {\row }</xsl:text>
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="personen">
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:text>\par</xsl:text>
+ <xsl:if test="studiengaenge/studiengang">
+ <xsl:text>\fs28\b Studiengänge:\b0</xsl:text>
+ <xsl:for-each select="studiengaenge/studiengang">
+ <xsl:text>\par\fs24 </xsl:text><xsl:value-of select="name"/><xsl:text>: </xsl:text><xsl:value-of select="anzahl"/>
+ </xsl:for-each>
+ <xsl:text>\par</xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+\par\qr\fs16 Generiert von Stud.IP Version <xsl:value-of select="@version"/>
+ </xsl:for-each>
+ <xsl:text> }</xsl:text>
+ </xsl:template>
+
+<xsl:template name="showperson">
+ <xsl:for-each select="person">
+ <xsl:text>
+\trowd \trgaph70\trleft-70\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt
+\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx2233\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx4536\clvertalt\clbrdrt
+\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx5839\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx6839\pard\plain \nowidctlpar\widctlpar\intbl\adjustright \lang1031\cgrid {\fs24</xsl:text>
+ <xsl:if test="titel">
+ <xsl:value-of select="titel"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="nachname"/>
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="vorname"/>
+ <xsl:if test="titel2">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="titel2"/>
+ </xsl:if>
+<xsl:text>\cell </xsl:text>
+ <xsl:if test="privatnummer">
+ <xsl:value-of select="privatnummer"/>
+ </xsl:if>
+<xsl:text>\cell </xsl:text>
+ <xsl:if test="email">
+ <xsl:value-of select="email"/>
+ </xsl:if>
+<xsl:text>\cell </xsl:text>
+ <xsl:if test="bemerkung">
+ <xsl:value-of select="bemerkung"/>
+ </xsl:if>
+<xsl:text>\cell }\pard \nowidctlpar\widctlpar\intbl\adjustright {\row }\pard</xsl:text>
+ </xsl:for-each>
+</xsl:template>
+</xsl:stylesheet>
diff --git a/lib/export/rtf-t-2.xsl b/lib/export/rtf-t-2.xsl
new file mode 100644
index 0000000..08c24de
--- /dev/null
+++ b/lib/export/rtf-t-2.xsl
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <xsl:output method="text" encoding="UTF-8"/>
+ <xsl:template match="/">
+<xsl:text>{\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fnil\fcharset0 Times New Roman;}}
+\viewkind4\uc1\pard</xsl:text>
+
+ <xsl:for-each select="studip">
+ <xsl:text>\par\fs36 Veranstaltung: </xsl:text><xsl:value-of select="@range"/>
+ <xsl:for-each select="institut"><xsl:text>
+\par</xsl:text>
+ <xsl:if test="personen">
+ <xsl:text>
+\par\fs28 Gruppen / Funktionen
+\par
+\par\trowd \trgaph70\trleft-70\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
+\brdrs\brdrw10 \cltxlrtb \cellx3000\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx6070\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
+\brdrs\brdrw10 \cltxlrtb \cellx9140\pard \nowidctlpar\widctlpar\intbl\adjustright {Name\cell Telefon\cell E-Mail\cell }\pard \nowidctlpar\widctlpar\intbl\adjustright {\row }\pard</xsl:text>
+
+ <xsl:choose>
+ <xsl:when test="personen/gruppe">
+ <xsl:for-each select="personen/gruppe">
+ <xsl:text>
+\trowd \trgaph70\trleft-70\trkeep\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt
+\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx9142\pard \nowidctlpar\widctlpar\intbl\adjustright {\b\fs24
+</xsl:text>
+ <xsl:value-of select="@key"/>
+ <xsl:text>\b0\cell }\pard \nowidctlpar\widctlpar\intbl\adjustright {\row }</xsl:text>
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="personen">
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:for-each>
+\par\qr\fs16 Generiert von Stud.IP Version <xsl:value-of select="@version"/>
+ </xsl:for-each>
+ <xsl:text> }</xsl:text>
+ </xsl:template>
+
+<xsl:template name="showperson">
+ <xsl:for-each select="person">
+ <xsl:text>
+\trowd \trgaph70\trleft-70\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb
+\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx3000\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl
+\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx6070\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx9140\pard \nowidctlpar\widctlpar\intbl\adjustright {\fs24</xsl:text>
+ <xsl:if test="titel">
+ <xsl:value-of select="titel"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="nachname"/>
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="vorname"/>
+ <xsl:if test="titel2">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="titel2"/>
+ </xsl:if>
+<xsl:text>\cell </xsl:text>
+ <xsl:if test="privatnummer">
+ <xsl:value-of select="privatnummer"/>
+ </xsl:if>
+<xsl:text>\cell </xsl:text>
+ <xsl:if test="email">
+ <xsl:value-of select="email"/>
+ </xsl:if>
+<xsl:text>\cell }\pard \nowidctlpar\widctlpar\intbl\adjustright {\row }\pard</xsl:text>
+ </xsl:for-each>
+</xsl:template>
+</xsl:stylesheet> \ No newline at end of file
diff --git a/lib/export/rtf-t-3.xsl b/lib/export/rtf-t-3.xsl
new file mode 100644
index 0000000..f9af9cf
--- /dev/null
+++ b/lib/export/rtf-t-3.xsl
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <xsl:output method="text" encoding="UTF-8"/>
+ <xsl:template match="/">
+<xsl:text>{\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fnil\fcharset0 Times New Roman;}}
+\viewkind4\uc1\pard</xsl:text>
+
+ <xsl:for-each select="studip">
+ <xsl:text>\par\fs36 Veranstaltung: </xsl:text><xsl:value-of select="@range"/>
+ <xsl:for-each select="institut"><xsl:text>
+\par</xsl:text>
+ <xsl:if test="personen">
+ <xsl:text>
+\par\fs28 Anmeldeliste
+\par
+\par\trowd \trgaph70\trleft-70\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
+\brdrs\brdrw10 \cltxlrtb \cellx2233\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx4536\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
+\brdrs\brdrw10 \cltxlrtb \cellx5839\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx6839\pard \nowidctlpar\widctlpar\intbl\adjustright {Name\cell Telefon\cell E-Mail\cell Bemerkung\cell }\pard \nowidctlpar\widctlpar\intbl\adjustright {\row }\pard</xsl:text>
+
+ <xsl:choose>
+ <xsl:when test="personen/gruppe">
+ <xsl:for-each select="personen/gruppe">
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="personen">
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:text>\par</xsl:text>
+ <xsl:if test="studiengaenge/studiengang">
+ <xsl:text>\fs28\b Studiengänge:\b0</xsl:text>
+ <xsl:for-each select="studiengaenge/studiengang">
+ <xsl:text>\par\fs24</xsl:text><xsl:value-of select="name"/><xsl:text>: </xsl:text><xsl:value-of select="anzahl"/>
+ </xsl:for-each>
+ <xsl:text>\par</xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+\par\qr\fs16 Generiert von Stud.IP Version <xsl:value-of select="@version"/>
+ </xsl:for-each>
+ <xsl:text> }</xsl:text>
+ </xsl:template>
+
+<xsl:template name="showperson">
+ <xsl:for-each select="person">
+ <xsl:text>
+\trowd \trgaph70\trleft-70\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt
+\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx2233\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx4536\clvertalt\clbrdrt
+\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx5839\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx6839\pard\plain \nowidctlpar\widctlpar\intbl\adjustright \lang1031\cgrid {\fs24</xsl:text>
+ <xsl:if test="titel">
+ <xsl:value-of select="titel"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="nachname"/>
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="vorname"/>
+ <xsl:if test="titel2">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="titel2"/>
+ </xsl:if>
+<xsl:text>\cell </xsl:text>
+ <xsl:if test="privatnummer">
+ <xsl:value-of select="privatnummer"/>
+ </xsl:if>
+<xsl:text>\cell </xsl:text>
+ <xsl:if test="email">
+ <xsl:value-of select="email"/>
+ </xsl:if>
+<xsl:text>\cell </xsl:text>
+ <xsl:if test="bemerkung">
+ <xsl:value-of select="bemerkung"/>
+ </xsl:if>
+<xsl:text>\cell }\pard \nowidctlpar\widctlpar\intbl\adjustright {\row }\pard</xsl:text>
+ </xsl:for-each>
+</xsl:template>
+</xsl:stylesheet>
diff --git a/lib/export/rtf-v-4.xsl b/lib/export/rtf-v-4.xsl
new file mode 100644
index 0000000..bf1d1a7
--- /dev/null
+++ b/lib/export/rtf-v-4.xsl
@@ -0,0 +1,231 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings">
+ <xsl:output method="text" encoding="UTF-8"/>
+ <xsl:template match="/">
+ <xsl:for-each select="studip">
+ <xsl:text>{\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fnil\fcharset0 Times New Roman;}}
+\viewkind4\uc1\pard\par\qc\fs56 </xsl:text><xsl:value-of select="@range"/>
+<xsl:text>\par\fs36 </xsl:text><xsl:value-of select="@uni"/>
+<xsl:text>\par\pard\fs44
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par\qc\fs96 </xsl:text>
+ <xsl:if test="institut/seminare">
+ <xsl:text>Vorlesungskommentar</xsl:text>
+ </xsl:if>
+<xsl:text>\par\fs56 </xsl:text><xsl:value-of select="@zeitraum"/>
+\par
+\par\qr\fs24 Generiert von Stud.IP Version <xsl:value-of select="@version"/>
+<xsl:text>\fs24\par\pard\page</xsl:text>
+ <xsl:for-each select="institut">
+ <xsl:text>
+\fs36 </xsl:text><xsl:choose>
+ <xsl:when test="type"><xsl:value-of select="type"/></xsl:when>
+ <xsl:otherwise>Einrichtung</xsl:otherwise>
+</xsl:choose>: <xsl:value-of select="name"/>
+<xsl:if test="fakultaet">
+ <xsl:text>
+\par\par\fs24\b Fakultät: \b0 </xsl:text>
+ <xsl:value-of select="fakultaet"/>
+</xsl:if>
+<xsl:if test="homepage">
+ <xsl:text>
+\par\b Homepage: \b0 </xsl:text>
+ <xsl:value-of select="homepage"/>
+</xsl:if>
+<xsl:if test="strasse">
+ <xsl:text>
+\par\b Strasse: \b0 </xsl:text>
+ <xsl:value-of select="strasse"/>
+</xsl:if>
+<xsl:if test="plz">
+ <xsl:text>
+\par\b Postleitzahl: \b0 </xsl:text>
+ <xsl:value-of select="plz"/>
+</xsl:if>
+<xsl:if test="telefon">
+ <xsl:text>
+\par\b Telefon: \b0 </xsl:text>
+ <xsl:value-of select="telefon"/>
+</xsl:if>
+<xsl:if test="fax">
+ <xsl:text>
+\par\b Fax: \b0 </xsl:text>
+ <xsl:value-of select="fax"/>
+</xsl:if>
+<xsl:if test="email">
+ <xsl:text>
+\par\b E-mail: \b0 </xsl:text>
+ <xsl:value-of select="email"/>
+</xsl:if>
+<xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <xsl:text>
+\par\b </xsl:text><xsl:value-of select="@key"/><xsl:text>: \b0 </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+</xsl:if>
+ <xsl:if test="seminare">
+ <xsl:text>
+\page\fs36 Veranstaltungen\fs24\par</xsl:text>
+ <xsl:choose>
+ <xsl:when test="seminare/gruppe">
+ <xsl:for-each select="seminare/gruppe">
+ <xsl:text>
+\par\fs32\b </xsl:text>
+ <xsl:value-of select="@key"/><xsl:text>\b0\fs24 </xsl:text>
+
+ <xsl:choose>
+ <xsl:when test="untergruppe">
+ <xsl:for-each select="untergruppe">
+ <xsl:text>
+\par\fs28\b </xsl:text>
+ <xsl:value-of select="@key"/><xsl:text>\b0\fs24 </xsl:text>
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="showseminar"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminare">
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:text>
+\page</xsl:text>
+ </xsl:for-each>
+ </xsl:for-each>
+ <xsl:text> }</xsl:text>
+ </xsl:template>
+
+
+ <xsl:template name="showseminar">
+ <xsl:for-each select="seminar">
+ <xsl:text>
+\par\brdrt\brdrs\brdrw10\brsp20 \brdrl\brdrs\brdrw10\brsp80 \brdrb
+\brdrs\brdrw10\brsp20 \brdrr\brdrs\brdrw10\brsp80 \adjustright \fs26\b\lang1031\cgrid { </xsl:text>
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each> - <xsl:value-of select="titel"/>
+ <xsl:text>\b0\par }\pard</xsl:text>
+ <xsl:if test="untertitel">
+ <xsl:text>
+\b Untertitel: \b0 </xsl:text>
+ <xsl:value-of select="untertitel"/>
+ <xsl:text>\par </xsl:text>
+ </xsl:if>
+ <xsl:text>
+\b Lehrende: \b0 </xsl:text><xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ <xsl:text>
+\par\b Termin: \b0 </xsl:text><xsl:value-of select="termine/termin"/>
+ <xsl:text>
+\par\b Erster Termin: \b0 </xsl:text><xsl:value-of select="termine/erstertermin"/>
+ <xsl:if test="termine/vorbesprechung">
+ <xsl:text>
+\par\b Vorbesprechung: \b0 </xsl:text><xsl:value-of select="termine/vorbesprechung"/>
+ </xsl:if>
+ <xsl:if test="status">
+ <xsl:text>
+\par\b Status: \b0 </xsl:text><xsl:value-of select="status"/>
+ </xsl:if>
+ <xsl:if test="veranstaltungsnummer">
+ <xsl:text>
+\par\b Veranstaltungsnummer: \b0 </xsl:text><xsl:value-of select="veranstaltungsnummer"/>
+ </xsl:if>
+ <xsl:if test="beschreibung">
+ <xsl:text>
+\par\b Beschreibung: \b0 </xsl:text><xsl:value-of select="str:replace(beschreibung, '&#10;', '\line ')"/>
+ </xsl:if>
+ <xsl:if test="raum">
+ <xsl:text>
+\par\b Raum: \b0 </xsl:text><xsl:value-of select="raum"/>
+ </xsl:if>
+ <xsl:if test="sonstiges">
+ <xsl:text>
+\par\b Sonstiges: \b0 </xsl:text><xsl:value-of select="sonstiges"/>
+ </xsl:if>
+ <xsl:if test="art">
+ <xsl:text>
+\par\b Art der Veranstaltung: \b0 </xsl:text><xsl:value-of select="art"/>
+ </xsl:if>
+ <xsl:if test="teilnehmer">
+ <xsl:text>
+\par\b Teilnahme: \b0 </xsl:text><xsl:value-of select="teilnehmer"/>
+ </xsl:if>
+ <xsl:if test="teilnehmerzahl">
+ <xsl:for-each select="teilnehmerzahl">
+ <xsl:text>
+\par\b </xsl:text><xsl:value-of select="@key"/><xsl:text> Anzahl Teilnehmende: \b0 </xsl:text><xsl:value-of select="."/>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="voraussetzung">
+ <xsl:text>
+\par\b Voraussetzungen: \b0 </xsl:text><xsl:value-of select="voraussetzung"/>
+ </xsl:if>
+ <xsl:if test="lernorga">
+ <xsl:text>
+\par\b Lernorganisation: \b0 </xsl:text><xsl:value-of select="lernorga"/>
+ </xsl:if>
+ <xsl:if test="schein">
+ <xsl:text>
+\par\b Leistungsnachweis: \b0 </xsl:text><xsl:value-of select="schein"/>
+ </xsl:if>
+ <xsl:if test="ects">
+ <xsl:text>
+\par\b ECTS: \b0 </xsl:text><xsl:value-of select="ects"/>
+ </xsl:if>
+ <xsl:if test="bereiche">
+ <xsl:text>
+\par\b Bereich: \b0 </xsl:text>
+ <xsl:for-each select="bereiche/bereich">
+\par <xsl:value-of select="."/>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="lvgruppen">
+ <xsl:text>
+\par\b Module: \b0 </xsl:text>
+ <xsl:for-each select="lvgruppen/lvgruppe">
+\par <xsl:value-of select="."/>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <xsl:text>
+\par\b </xsl:text><xsl:value-of select="@key"/><xsl:text>: \b0 </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:text>
+\par </xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/lib/export/rtf-vp-1.xsl b/lib/export/rtf-vp-1.xsl
new file mode 100644
index 0000000..5f7c4e5
--- /dev/null
+++ b/lib/export/rtf-vp-1.xsl
@@ -0,0 +1,264 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings">
+ <xsl:output method="text" encoding='UTF-8'/>
+ <xsl:template match="/">
+ <xsl:text>{\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fnil\fcharset0 Times New Roman;}}
+\viewkind4\uc1\pard\par\</xsl:text>
+
+ <xsl:for-each select="studip">
+ <xsl:for-each select="institut">
+ <xsl:text>
+\fs36 </xsl:text><xsl:choose>
+ <xsl:when test="type"><xsl:value-of select="type"/></xsl:when>
+ <xsl:otherwise>Einrichtung</xsl:otherwise>
+</xsl:choose>: <xsl:value-of select="name"/>
+<xsl:if test="fakultaet">
+ <xsl:text>
+\par\par\fs24\b Fakultät: \b0 </xsl:text>
+ <xsl:value-of select="fakultaet"/>
+</xsl:if>
+<xsl:if test="homepage">
+ <xsl:text>
+\par\b Homepage: \b0 </xsl:text>
+ <xsl:value-of select="homepage"/>
+</xsl:if>
+<xsl:if test="strasse">
+ <xsl:text>
+\par\b Strasse: \b0 </xsl:text>
+ <xsl:value-of select="strasse"/>
+</xsl:if>
+<xsl:if test="plz">
+ <xsl:text>
+\par\b Postleitzahl: \b0 </xsl:text>
+ <xsl:value-of select="plz"/>
+</xsl:if>
+<xsl:if test="telefon">
+ <xsl:text>
+\par\b Telefon: \b0 </xsl:text>
+ <xsl:value-of select="telefon"/>
+</xsl:if>
+<xsl:if test="fax">
+ <xsl:text>
+\par\b Fax: \b0 </xsl:text>
+ <xsl:value-of select="fax"/>
+</xsl:if>
+<xsl:if test="email">
+ <xsl:text>
+\par\b E-mail: \b0 </xsl:text>
+ <xsl:value-of select="email"/>
+</xsl:if>
+<xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <xsl:text>
+\par\b </xsl:text><xsl:value-of select="@key"/><xsl:text>: \b0 </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+</xsl:if>
+ <xsl:if test="seminare">
+ <xsl:text>
+\page\fs36 Veranstaltungen\fs24\par</xsl:text>
+ <xsl:choose>
+ <xsl:when test="seminare/gruppe">
+ <xsl:for-each select="seminare/gruppe">
+ <xsl:text>
+\par\fs32\b </xsl:text>
+ <xsl:value-of select="@key"/><xsl:text>\b0\fs24 </xsl:text>
+
+ <xsl:choose>
+ <xsl:when test="untergruppe">
+ <xsl:for-each select="untergruppe">
+ <xsl:text>
+\par\fs28\b </xsl:text>
+ <xsl:value-of select="@key"/><xsl:text>\b0\fs24 </xsl:text>
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="showseminar"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminare">
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="personen">
+ <xsl:text>
+\page\par\fs36 MitarbeiterInnen\fs24\par </xsl:text>
+ <xsl:text>
+\par\trowd \trgaph70\trleft-70\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10
+\trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx1839\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
+\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx3748\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx5657\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
+\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx7566\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx9475\pard\plain \nowidctlpar\intbl\adjustright \lang1031\cgrid
+{\fs24\b Name\b0\cell\b Telefon\b0\cell\b Raum\b0\cell\b Sprechzeit\b0\cell\b E-Mail\b0\cell }\pard \nowidctlpar\widctlpar\intbl\adjustright {\row }\pard</xsl:text>
+ <xsl:choose>
+ <xsl:when test="personen/gruppe">
+ <xsl:for-each select="personen/gruppe">
+ <xsl:text>
+\brdrt\brdrs\brdrw10\brsp20 \brdrl\brdrs\brdrw10\brsp80 \brdrb
+\brdrs\brdrw10\brsp20 \brdrr\brdrs\brdrw10\brsp80 \adjustright \fs24\lang1031\cgrid { </xsl:text>
+ <xsl:value-of select="@key"/>
+ <xsl:text>\par }\pard</xsl:text>
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="personen">
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:text>
+\page</xsl:text>
+ </xsl:for-each>
+\par\qr\fs24 Generiert von Stud.IP Version <xsl:value-of select="@version"/>
+ </xsl:for-each>
+ <xsl:text> }</xsl:text>
+ </xsl:template>
+ <xsl:template name="showperson">
+ <xsl:for-each select="person">
+ <xsl:text>
+\trowd \trgaph70\trleft-70\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10
+\trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx1839\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
+\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx3748\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx5657\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
+\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx7566\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx9475\pard\plain \nowidctlpar\intbl\adjustright \lang1031\cgrid
+{\fs24 </xsl:text>
+ <xsl:if test="titel">
+ <xsl:value-of select="titel"/><xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="vorname"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="nachname"/>
+ <xsl:if test="titel2">
+ <xsl:text>, </xsl:text><xsl:value-of select="titel2"/>
+ </xsl:if>
+<xsl:text>\cell </xsl:text>
+ <xsl:if test="telefon">
+ <xsl:value-of select="telefon"/>
+ </xsl:if>
+<xsl:text>\cell </xsl:text>
+ <xsl:if test="raum">
+ <xsl:value-of select="raum"/>
+ </xsl:if>
+<xsl:text>\cell </xsl:text>
+ <xsl:if test="sprechzeiten">
+ <xsl:value-of select="sprechzeiten"/>
+ </xsl:if>
+<xsl:text>\cell </xsl:text>
+ <xsl:if test="email">
+ <xsl:value-of select="email"/>
+ </xsl:if>
+<xsl:text>\cell }\pard \nowidctlpar\widctlpar\intbl\adjustright {\row }\pard</xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="showseminar">
+ <xsl:for-each select="seminar">
+ <xsl:text>
+\par\brdrt\brdrs\brdrw10\brsp20 \brdrl\brdrs\brdrw10\brsp80 \brdrb
+\brdrs\brdrw10\brsp20 \brdrr\brdrs\brdrw10\brsp80 \adjustright \fs26\b\lang1031\cgrid { </xsl:text>
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each> - <xsl:value-of select="titel"/>
+ <xsl:text>\b0\par }\pard</xsl:text>
+ <xsl:if test="untertitel">
+ <xsl:text>
+\b Untertitel: \b0 </xsl:text>
+ <xsl:value-of select="untertitel"/>
+ <xsl:text>\par </xsl:text>
+ </xsl:if>
+ <xsl:text>
+\b Lehrende: \b0 </xsl:text><xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ <xsl:text>
+\par\b Termin: \b0 </xsl:text><xsl:value-of select="termine/termin"/>
+ <xsl:text>
+\par\b Erster Termin: \b0 </xsl:text><xsl:value-of select="termine/erstertermin"/>
+ <xsl:if test="termine/vorbesprechung">
+ <xsl:text>
+\par\b Vorbesprechung: \b0 </xsl:text><xsl:value-of select="termine/vorbesprechung"/>
+ </xsl:if>
+ <xsl:if test="status">
+ <xsl:text>
+\par\b Status: \b0 </xsl:text><xsl:value-of select="status"/>
+ </xsl:if>
+ <xsl:if test="beschreibung">
+ <xsl:text>
+\par\b Beschreibung: \b0 </xsl:text><xsl:value-of select="str:replace(beschreibung, '&#10;', '\line ')"/>
+ </xsl:if>
+ <xsl:if test="raum">
+ <xsl:text>
+\par\b Raum: \b0 </xsl:text><xsl:value-of select="raum"/>
+ </xsl:if>
+ <xsl:if test="sonstiges">
+ <xsl:text>
+\par\b Sonstiges: \b0 </xsl:text><xsl:value-of select="sonstiges"/>
+ </xsl:if>
+ <xsl:if test="art">
+ <xsl:text>
+\par\b Art der Veranstaltung: \b0 </xsl:text><xsl:value-of select="art"/>
+ </xsl:if>
+ <xsl:if test="teilnehmer">
+ <xsl:text>
+\par\b Teilnahme: \b0 </xsl:text><xsl:value-of select="teilnehmer"/>
+ </xsl:if>
+ <xsl:if test="teilnehmerzahl">
+ <xsl:for-each select="teilnehmerzahl">
+ <xsl:text>
+\par\b </xsl:text><xsl:value-of select="@key"/><xsl:text> Anzahl Teilnehmende: \b0 </xsl:text><xsl:value-of select="."/>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="voraussetzung">
+ <xsl:text>
+\par\b Voraussetzungen: \b0 </xsl:text><xsl:value-of select="voraussetzung"/>
+ </xsl:if>
+ <xsl:if test="lernorga">
+ <xsl:text>
+\par\b Lernorganisation: \b0 </xsl:text><xsl:value-of select="lernorga"/>
+ </xsl:if>
+ <xsl:if test="schein">
+ <xsl:text>
+\par\b Leistungsnachweis: \b0 </xsl:text><xsl:value-of select="schein"/>
+ </xsl:if>
+ <xsl:if test="ects">
+ <xsl:text>
+\par\b ECTS: \b0 </xsl:text><xsl:value-of select="ects"/>
+ </xsl:if>
+ <xsl:if test="bereiche">
+ <xsl:text>
+\par\b Bereich: \b0 </xsl:text>
+ <xsl:for-each select="bereiche/bereich">
+\par <xsl:value-of select="."/>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="lvgruppen">
+ <xsl:text>
+\par\b Module: \b0 </xsl:text>
+ <xsl:for-each select="lvgruppen/lvgruppe">
+\par <xsl:value-of select="."/>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <xsl:text>
+\par\b </xsl:text><xsl:value-of select="@key"/><xsl:text>: \b0 </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:text>
+\par </xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/lib/export/rtf-vp-2.xsl b/lib/export/rtf-vp-2.xsl
new file mode 100644
index 0000000..55a3290
--- /dev/null
+++ b/lib/export/rtf-vp-2.xsl
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <xsl:output method="text" encoding="UTF-8"/>
+ <xsl:template match="/">
+ <xsl:text>{\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fnil\fcharset0 Times New Roman;}}
+\viewkind4\uc1\pard\par\</xsl:text>
+
+ <xsl:for-each select="studip">
+ <xsl:for-each select="institut">
+ <xsl:text>
+\fs36 </xsl:text><xsl:choose>
+ <xsl:when test="type"><xsl:value-of select="type"/></xsl:when>
+ <xsl:otherwise>Einrichtung</xsl:otherwise>
+</xsl:choose>: <xsl:value-of select="name"/>
+<xsl:if test="fakultaet">
+ <xsl:text>
+\par\par\fs24\b Fakultät: \b0 </xsl:text>
+ <xsl:value-of select="fakultaet"/>
+</xsl:if>
+<xsl:if test="homepage">
+ <xsl:text>
+\par\b Homepage: \b0 </xsl:text>
+ <xsl:value-of select="homepage"/>
+</xsl:if>
+<xsl:if test="strasse">
+ <xsl:text>
+\par\b Strasse: \b0 </xsl:text>
+ <xsl:value-of select="strasse"/>
+</xsl:if>
+<xsl:if test="plz">
+ <xsl:text>
+\par\b Postleitzahl: \b0 </xsl:text>
+ <xsl:value-of select="plz"/>
+</xsl:if>
+<xsl:if test="telefon">
+ <xsl:text>
+\par\b Telefon: \b0 </xsl:text>
+ <xsl:value-of select="telefon"/>
+</xsl:if>
+<xsl:if test="fax">
+ <xsl:text>
+\par\b Fax: \b0 </xsl:text>
+ <xsl:value-of select="fax"/>
+</xsl:if>
+<xsl:if test="email">
+ <xsl:text>
+\par\b E-mail: \b0 </xsl:text>
+ <xsl:value-of select="email"/>
+</xsl:if>
+<xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <xsl:text>
+\par\b </xsl:text><xsl:value-of select="@key"/><xsl:text>: \b0 </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+</xsl:if>
+ <xsl:if test="seminare">
+ <xsl:text>
+\page\fs36 Veranstaltungen\fs24\par</xsl:text>
+ <xsl:text>
+\par\trowd \trgaph70\trleft-70\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10
+\trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx1839\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
+\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx3748\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx5657\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
+\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx7566\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx9475\pard\plain \nowidctlpar\intbl\adjustright \lang1031\cgrid
+{\fs24\b Lehrende\b0\cell\b Veranstaltung\b0\cell\b Status\b0\cell\b Termin\b0\cell\b Raum\b0\cell }\pard \nowidctlpar\widctlpar\intbl\adjustright {\row }\pard</xsl:text>
+ <xsl:choose>
+ <xsl:when test="seminare/gruppe">
+ <xsl:for-each select="seminare/gruppe">
+ <xsl:text>
+\brdrt\brdrs\brdrw10\brsp20 \brdrl\brdrs\brdrw10\brsp80 \brdrb
+\brdrs\brdrw10\brsp20 \brdrr\brdrs\brdrw10\brsp80 \adjustright \fs28\lang1031\cgrid { </xsl:text>
+ <xsl:value-of select="@key"/>
+ <xsl:text>\par }\pard</xsl:text>
+ <xsl:choose>
+ <xsl:when test="untergruppe">
+ <xsl:for-each select="untergruppe">
+ <xsl:text>
+\brdrt\brdrs\brdrw10\brsp20 \brdrl\brdrs\brdrw10\brsp80 \brdrb
+\brdrs\brdrw10\brsp20 \brdrr\brdrs\brdrw10\brsp80 \adjustright \fs24\lang1031\cgrid { </xsl:text>
+ <xsl:value-of select="@key"/>
+ <xsl:text>\par }\pard</xsl:text>
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="showseminar"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminare">
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="personen">
+ <xsl:text>
+\page\par\fs36 MitarbeiterInnen\fs24\par </xsl:text>
+ <xsl:text>
+\par\trowd \trgaph70\trleft-70\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10
+\trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx1839\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
+\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx3748\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx5657\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
+\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx7566\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx9475\pard\plain \nowidctlpar\intbl\adjustright \lang1031\cgrid
+{\fs24\b Name\b0\cell\b Telefon\b0\cell\b Raum\b0\cell\b Sprechzeit\b0\cell\b E-Mail\b0\cell }\pard \nowidctlpar\widctlpar\intbl\adjustright {\row }\pard</xsl:text>
+ <xsl:choose>
+ <xsl:when test="personen/gruppe">
+ <xsl:for-each select="personen/gruppe">
+ <xsl:text>
+\brdrt\brdrs\brdrw10\brsp20 \brdrl\brdrs\brdrw10\brsp80 \brdrb
+\brdrs\brdrw10\brsp20 \brdrr\brdrs\brdrw10\brsp80 \adjustright \fs24\lang1031\cgrid { </xsl:text>
+ <xsl:value-of select="@key"/>
+ <xsl:text>\par }\pard</xsl:text>
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="personen">
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:text>
+\page</xsl:text>
+ </xsl:for-each>
+\par\qr\fs24 Generiert von Stud.IP Version <xsl:value-of select="@version"/>
+ </xsl:for-each>
+ <xsl:text> }</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="showperson">
+ <xsl:for-each select="person">
+ <xsl:text>
+\trowd \trgaph70\trleft-70\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10
+\trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx1839\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
+\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx3748\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx5657\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
+\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx7566\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx9475\pard\plain \nowidctlpar\intbl\adjustright \lang1031\cgrid
+{\fs24 </xsl:text>
+ <xsl:if test="titel">
+ <xsl:value-of select="titel"/><xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="vorname"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="nachname"/>
+ <xsl:if test="titel2">
+ <xsl:text>, </xsl:text><xsl:value-of select="titel2"/>
+ </xsl:if>
+<xsl:text>\cell </xsl:text>
+ <xsl:if test="telefon">
+ <xsl:value-of select="telefon"/>
+ </xsl:if>
+<xsl:text>\cell </xsl:text>
+ <xsl:if test="raum">
+ <xsl:value-of select="raum"/>
+ </xsl:if>
+<xsl:text>\cell </xsl:text>
+ <xsl:if test="sprechzeiten">
+ <xsl:value-of select="sprechzeiten"/>
+ </xsl:if>
+<xsl:text>\cell </xsl:text>
+ <xsl:if test="email">
+ <xsl:value-of select="email"/>
+ </xsl:if>
+<xsl:text>\cell }\pard \nowidctlpar\widctlpar\intbl\adjustright {\row }\pard</xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="showseminar">
+ <xsl:for-each select="seminar">
+ <xsl:text>
+\trowd \trgaph70\trleft-70\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10
+\trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx1839\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
+\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx3748\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx5657\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
+\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx7566\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx9475\pard\plain \nowidctlpar\intbl\adjustright \lang1031\cgrid
+{\fs24 </xsl:text>
+ <xsl:value-of select="titel"/>
+<xsl:text>\cell </xsl:text>
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+<xsl:text>\cell </xsl:text>
+ <xsl:value-of select="status"/>
+<xsl:text>\cell </xsl:text>
+ <xsl:value-of select="termine/termin"/>
+<xsl:text>\cell </xsl:text>
+ <xsl:value-of select="raum"/>
+<xsl:text>\cell }\pard \nowidctlpar\widctlpar\intbl\adjustright {\row }\pard</xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+</xsl:stylesheet> \ No newline at end of file
diff --git a/lib/export/rtf-vp-3.xsl b/lib/export/rtf-vp-3.xsl
new file mode 100644
index 0000000..3dad3a5
--- /dev/null
+++ b/lib/export/rtf-vp-3.xsl
@@ -0,0 +1,293 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings">
+ <xsl:output method="text" encoding="UTF-8"/>
+ <xsl:template match="/">
+ <xsl:for-each select="studip">
+ <xsl:text>{\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fnil\fcharset0 Times New Roman;}}
+\viewkind4\uc1\pard\par\qc\fs56 </xsl:text><xsl:value-of select="@range"/>
+<xsl:text>\par\fs36 </xsl:text><xsl:value-of select="@uni"/>
+<xsl:text>\par\pard\fs44
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par\qc\fs96 </xsl:text>
+ <xsl:if test="institut/seminare">
+ <xsl:text>Vorlesungskommentar</xsl:text>
+ </xsl:if>
+ <xsl:if test="institut/personen">
+ <xsl:text>MitarbeiterInnenliste</xsl:text>
+ </xsl:if>
+<xsl:text>\par\fs56 </xsl:text><xsl:value-of select="@zeitraum"/>
+\par
+\par\qr\fs24 Generiert von Stud.IP Version <xsl:value-of select="@version"/>
+<xsl:text>\fs24\par\pard\page</xsl:text>
+ <xsl:for-each select="institut">
+ <xsl:text>
+\fs36 </xsl:text><xsl:choose>
+ <xsl:when test="type"><xsl:value-of select="type"/></xsl:when>
+ <xsl:otherwise>Einrichtung</xsl:otherwise>
+</xsl:choose>: <xsl:value-of select="name"/>
+<xsl:if test="fakultaet">
+ <xsl:text>
+\par\par\fs24\b Fakultät: \b0 </xsl:text>
+ <xsl:value-of select="fakultaet"/>
+</xsl:if>
+<xsl:if test="homepage">
+ <xsl:text>
+\par\b Homepage: \b0 </xsl:text>
+ <xsl:value-of select="homepage"/>
+</xsl:if>
+<xsl:if test="strasse">
+ <xsl:text>
+\par\b Strasse: \b0 </xsl:text>
+ <xsl:value-of select="strasse"/>
+</xsl:if>
+<xsl:if test="plz">
+ <xsl:text>
+\par\b Postleitzahl: \b0 </xsl:text>
+ <xsl:value-of select="plz"/>
+</xsl:if>
+<xsl:if test="telefon">
+ <xsl:text>
+\par\b Telefon: \b0 </xsl:text>
+ <xsl:value-of select="telefon"/>
+</xsl:if>
+<xsl:if test="fax">
+ <xsl:text>
+\par\b Fax: \b0 </xsl:text>
+ <xsl:value-of select="fax"/>
+</xsl:if>
+<xsl:if test="email">
+ <xsl:text>
+\par\b E-mail: \b0 </xsl:text>
+ <xsl:value-of select="email"/>
+</xsl:if>
+<xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <xsl:text>
+\par\b </xsl:text><xsl:value-of select="@key"/><xsl:text>: \b0 </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+</xsl:if>
+ <xsl:if test="seminare">
+ <xsl:text>
+\page\fs36 Veranstaltungen\fs24\par</xsl:text>
+ <xsl:choose>
+ <xsl:when test="seminare/gruppe">
+ <xsl:for-each select="seminare/gruppe">
+ <xsl:text>
+\par\fs32\b </xsl:text>
+ <xsl:value-of select="@key"/><xsl:text>\b0\fs24 </xsl:text>
+
+ <xsl:choose>
+ <xsl:when test="untergruppe">
+ <xsl:for-each select="untergruppe">
+ <xsl:text>
+\par\fs28\b </xsl:text>
+ <xsl:value-of select="@key"/><xsl:text>\b0\fs24 </xsl:text>
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="showseminar"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminare">
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="personen">
+ <xsl:text>
+\page\par\fs36 MitarbeiterInnen\fs24\par </xsl:text>
+ <xsl:text>
+\par\trowd \trgaph70\trleft-70\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10
+\trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx1839\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
+\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx3748\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx5657\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
+\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx7566\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx9475\pard\plain \nowidctlpar\intbl\adjustright \lang1031\cgrid
+{\fs24\b Name\b0\cell\b Telefon\b0\cell\b Raum\b0\cell\b Sprechzeit\b0\cell\b E-Mail\b0\cell }\pard \nowidctlpar\widctlpar\intbl\adjustright {\row }\pard</xsl:text>
+ <xsl:choose>
+ <xsl:when test="personen/gruppe">
+ <xsl:for-each select="personen/gruppe">
+ <xsl:text>
+\brdrt\brdrs\brdrw10\brsp20 \brdrl\brdrs\brdrw10\brsp80 \brdrb
+\brdrs\brdrw10\brsp20 \brdrr\brdrs\brdrw10\brsp80 \adjustright \fs24\lang1031\cgrid { </xsl:text>
+ <xsl:value-of select="@key"/>
+ <xsl:text>\par }\pard</xsl:text>
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="personen">
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:text>
+\page</xsl:text>
+ </xsl:for-each>
+ </xsl:for-each>
+ <xsl:text> }</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="showperson">
+ <xsl:for-each select="person">
+ <xsl:text>
+\trowd \trgaph70\trleft-70\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10
+\trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx1839\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
+\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx3748\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx5657\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
+\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx7566\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx9475\pard\plain \nowidctlpar\intbl\adjustright \lang1031\cgrid
+{\fs24 </xsl:text>
+ <xsl:if test="titel">
+ <xsl:value-of select="titel"/><xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="vorname"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="nachname"/>
+ <xsl:if test="titel2">
+ <xsl:text>, </xsl:text><xsl:value-of select="titel2"/>
+ </xsl:if>
+<xsl:text>\cell </xsl:text>
+ <xsl:if test="telefon">
+ <xsl:value-of select="telefon"/>
+ </xsl:if>
+<xsl:text>\cell </xsl:text>
+ <xsl:if test="raum">
+ <xsl:value-of select="raum"/>
+ </xsl:if>
+<xsl:text>\cell </xsl:text>
+ <xsl:if test="sprechzeiten">
+ <xsl:value-of select="sprechzeiten"/>
+ </xsl:if>
+<xsl:text>\cell </xsl:text>
+ <xsl:if test="email">
+ <xsl:value-of select="email"/>
+ </xsl:if>
+<xsl:text>\cell }\pard \nowidctlpar\widctlpar\intbl\adjustright {\row }\pard</xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="showseminar">
+ <xsl:for-each select="seminar">
+ <xsl:text>
+\par\brdrt\brdrs\brdrw10\brsp20 \brdrl\brdrs\brdrw10\brsp80 \brdrb
+\brdrs\brdrw10\brsp20 \brdrr\brdrs\brdrw10\brsp80 \adjustright \fs26\b\lang1031\cgrid { </xsl:text>
+ <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each> - <xsl:value-of select="titel"/>
+ <xsl:text>\b0\par }\pard</xsl:text>
+ <xsl:if test="untertitel">
+ <xsl:text>
+\b Untertitel: \b0 </xsl:text>
+ <xsl:value-of select="untertitel"/>
+ <xsl:text>\par </xsl:text>
+ </xsl:if>
+ <xsl:text>
+\b Lehrende: \b0 </xsl:text><xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ <xsl:text>
+\par\b Termin: \b0 </xsl:text><xsl:value-of select="termine/termin"/>
+ <xsl:text>
+\par\b Erster Termin: \b0 </xsl:text><xsl:value-of select="termine/erstertermin"/>
+ <xsl:if test="termine/vorbesprechung">
+ <xsl:text>
+\par\b Vorbesprechung: \b0 </xsl:text><xsl:value-of select="termine/vorbesprechung"/>
+ </xsl:if>
+ <xsl:if test="status">
+ <xsl:text>
+\par\b Status: \b0 </xsl:text><xsl:value-of select="status"/>
+ </xsl:if>
+ <xsl:if test="beschreibung">
+ <xsl:text>
+\par\b Beschreibung: \b0 </xsl:text><xsl:value-of select="str:replace(beschreibung, '&#10;', '\line ')"/>
+ </xsl:if>
+ <xsl:if test="raum">
+ <xsl:text>
+\par\b Raum: \b0 </xsl:text><xsl:value-of select="raum"/>
+ </xsl:if>
+ <xsl:if test="sonstiges">
+ <xsl:text>
+\par\b Sonstiges: \b0 </xsl:text><xsl:value-of select="sonstiges"/>
+ </xsl:if>
+ <xsl:if test="art">
+ <xsl:text>
+\par\b Art der Veranstaltung: \b0 </xsl:text><xsl:value-of select="art"/>
+ </xsl:if>
+ <xsl:if test="teilnehmer">
+ <xsl:text>
+\par\b Teilnahme: \b0 </xsl:text><xsl:value-of select="teilnehmer"/>
+ </xsl:if>
+ <xsl:if test="teilnehmerzahl">
+ <xsl:for-each select="teilnehmerzahl">
+ <xsl:text>
+\par\b </xsl:text><xsl:value-of select="@key"/><xsl:text> Anzahl Teilnehmende: \b0 </xsl:text><xsl:value-of select="."/>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="voraussetzung">
+ <xsl:text>
+\par\b Voraussetzungen: \b0 </xsl:text><xsl:value-of select="voraussetzung"/>
+ </xsl:if>
+ <xsl:if test="lernorga">
+ <xsl:text>
+\par\b Lernorganisation: \b0 </xsl:text><xsl:value-of select="lernorga"/>
+ </xsl:if>
+ <xsl:if test="schein">
+ <xsl:text>
+\par\b Leistungsnachweis: \b0 </xsl:text><xsl:value-of select="schein"/>
+ </xsl:if>
+ <xsl:if test="ects">
+ <xsl:text>
+\par\b ECTS: \b0 </xsl:text><xsl:value-of select="ects"/>
+ </xsl:if>
+ <xsl:if test="bereiche">
+ <xsl:text>
+\par\b Bereich: \b0 </xsl:text>
+ <xsl:for-each select="bereiche/bereich">
+\par <xsl:value-of select="."/>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="lvgruppen">
+ <xsl:text>
+\par\b Module: \b0 </xsl:text>
+ <xsl:for-each select="lvgruppen/lvgruppe">
+\par <xsl:value-of select="."/>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <xsl:text>
+\par\b </xsl:text><xsl:value-of select="@key"/><xsl:text>: \b0 </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:text>
+\par </xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/lib/export/txt-v-3.xsl b/lib/export/txt-v-3.xsl
new file mode 100644
index 0000000..167402e
--- /dev/null
+++ b/lib/export/txt-v-3.xsl
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <xsl:output method="text" encoding="UTF-8"/>
+ <xsl:template match="/">
+ <xsl:text>&#xFEFF;</xsl:text>
+ <xsl:for-each select="studip">
+ <xsl:for-each select="institut">
+<xsl:choose>
+ <xsl:when test="type"><xsl:value-of select="type"/></xsl:when>
+ <xsl:otherwise>Einrichtung</xsl:otherwise>
+</xsl:choose>: <xsl:value-of select="name"/>
+<xsl:if test="fakultaet">
+Fakultät: <xsl:value-of select="fakultaet"/>
+</xsl:if>
+<xsl:if test="homepage">
+Homepage: <xsl:value-of select="homepage"/>
+</xsl:if>
+<xsl:if test="strasse">
+Strasse: <xsl:value-of select="strasse"/>
+</xsl:if>
+<xsl:if test="plz">
+Postleitzahl: <xsl:value-of select="plz"/>
+</xsl:if>
+<xsl:if test="telefon">
+Telefon: <xsl:value-of select="telefon"/>
+</xsl:if>
+<xsl:if test="fax">
+Fax: <xsl:value-of select="fax"/>
+</xsl:if>
+<xsl:if test="email">
+E-mail: <xsl:value-of select="email"/>
+</xsl:if>
+<xsl:if test="datenfelder">
+<xsl:for-each select="datenfelder/datenfeld"><xsl:text>
+</xsl:text><xsl:value-of select="@key"/>: <xsl:value-of select="."/>
+</xsl:for-each>
+</xsl:if>
+<xsl:text>
+</xsl:text>
+<xsl:if test="seminare">
+Veranstaltungen
+ <xsl:choose>
+ <xsl:when test="seminare/gruppe">
+ <xsl:for-each select="seminare/gruppe">
+Gruppe: <xsl:value-of select="@key"/><xsl:text>
+</xsl:text>
+ <xsl:choose>
+ <xsl:when test="untergruppe">
+ <xsl:for-each select="untergruppe">
+Untergruppe:<xsl:value-of select="@key"/><xsl:text>
+</xsl:text>
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="showseminar"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminare">
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:for-each>
+
+ Generiert von Stud.IP Version <xsl:value-of select="@version"/>
+ </xsl:for-each>
+ </xsl:template>
+
+<xsl:template name="showseminar">
+ <xsl:for-each select="seminar">
+Veranstaltung - <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each> - <xsl:value-of select="titel"/> -
+ <xsl:if test="untertitel">
+Untertitel: <xsl:value-of select="untertitel"/>
+ </xsl:if>
+Lehrende: <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+Termin: <xsl:value-of select="termine/termin"/>
+Erster Termin: <xsl:value-of select="termine/erstertermin"/>
+ <xsl:if test="termine/vorbesprechung">
+Vorbesprechung: <xsl:value-of select="termine/vorbesprechung"/>
+ </xsl:if>
+ <xsl:if test="status">
+Status: <xsl:value-of select="status"/>
+ </xsl:if>
+ <xsl:if test="veranstaltungsnummer">
+Veranstaltungsnummer: <xsl:value-of select="veranstaltungsnummer"/>
+ </xsl:if>
+ <xsl:if test="beschreibung">
+Beschreibung: <xsl:value-of select="beschreibung"/>
+ </xsl:if>
+ <xsl:if test="raum">
+Raum: <xsl:value-of select="raum"/>
+ </xsl:if>
+ <xsl:if test="sonstiges">
+Sonstiges: <xsl:value-of select="sonstiges"/>
+ </xsl:if>
+ <xsl:if test="art">
+Art der Veranstaltung: <xsl:value-of select="art"/>
+ </xsl:if>
+ <xsl:if test="teilnehmer">
+Teilnahme: <xsl:value-of select="teilnehmer"/>
+ </xsl:if>
+ <xsl:if test="teilnehmerzahl"> <xsl:for-each select="teilnehmerzahl"><xsl:text>
+</xsl:text><xsl:value-of select="@key"/> Anzahl Teilnehmende: <xsl:value-of select="."/>
+ </xsl:for-each></xsl:if>
+ <xsl:if test="voraussetzung">
+Voraussetzungen: <xsl:value-of select="voraussetzung"/>
+ </xsl:if>
+ <xsl:if test="lernorga">
+Lernorganisation: <xsl:value-of select="lernorga"/>
+ </xsl:if>
+ <xsl:if test="schein">
+Leistungsnachweis: <xsl:value-of select="schein"/>
+ </xsl:if>
+ <xsl:if test="ects">
+ECTS: <xsl:value-of select="ects"/>
+ </xsl:if>
+ <xsl:if test="bereiche">
+Bereich:
+<xsl:for-each select="bereiche/bereich"><xsl:value-of select="."/><xsl:text>
+</xsl:text></xsl:for-each>
+ </xsl:if>
+ <xsl:if test="lvgruppen">
+Module:
+<xsl:for-each select="lvgruppen/lvgruppe"><xsl:value-of select="."/><xsl:text>
+</xsl:text></xsl:for-each>
+ </xsl:if>
+<xsl:if test="datenfelder">
+<xsl:for-each select="datenfelder/datenfeld">
+<xsl:value-of select="@key"/>: <xsl:value-of select="."/>
+</xsl:for-each>
+</xsl:if>
+<xsl:text>
+</xsl:text>
+ </xsl:for-each>
+</xsl:template>
+</xsl:stylesheet>
diff --git a/lib/export/txt-vp-1.xsl b/lib/export/txt-vp-1.xsl
new file mode 100644
index 0000000..59e133f
--- /dev/null
+++ b/lib/export/txt-vp-1.xsl
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <xsl:output method="text" encoding="UTF-8"/>
+ <xsl:template match="/">
+ <xsl:text>&#xFEFF;</xsl:text>
+ <xsl:for-each select="studip">
+ <xsl:for-each select="institut">
+-----------------------------------------------------------------
+<xsl:choose>
+ <xsl:when test="type"><xsl:value-of select="type"/></xsl:when>
+ <xsl:otherwise>Einrichtung</xsl:otherwise>
+</xsl:choose>: <xsl:value-of select="name"/>
+-----------------------------------------------------------------
+ <xsl:if test="fakultaet">
+ Fakultät: <xsl:value-of select="fakultaet"/>
+ </xsl:if>
+ <xsl:if test="homepage">
+ Homepage: <xsl:value-of select="homepage"/>
+ </xsl:if>
+ <xsl:if test="strasse">
+ Strasse: <xsl:value-of select="strasse"/>
+ </xsl:if>
+ <xsl:if test="plz">
+ Postleitzahl: <xsl:value-of select="plz"/>
+ </xsl:if>
+ <xsl:if test="telefon">
+ Telefon: <xsl:value-of select="telefon"/>
+ </xsl:if>
+ <xsl:if test="fax">
+ Fax: <xsl:value-of select="fax"/>
+ </xsl:if>
+ <xsl:if test="email">
+ E-mail: <xsl:value-of select="email"/>
+ </xsl:if>
+ <xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+ <xsl:text>
+ </xsl:text><xsl:value-of select="@key"/>: <xsl:text> </xsl:text><xsl:value-of select="."/>
+ </xsl:for-each>
+ </xsl:if>
+
+ <xsl:if test="seminare">
+ ------------------------------------------------------------
+ Veranstaltungen
+ ------------------------------------------------------------
+ <xsl:choose>
+ <xsl:when test="seminare/gruppe">
+ <xsl:for-each select="seminare/gruppe">
+ -------- <xsl:value-of select="@key"/> --------<xsl:text>
+</xsl:text>
+ <xsl:choose>
+ <xsl:when test="untergruppe">
+ <xsl:for-each select="untergruppe">
+ --- <xsl:value-of select="@key"/> ---<xsl:text>
+</xsl:text>
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="showseminar"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminare">
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="personen">
+ ------------------------------------------------------------
+ MitarbeiterInnen
+ ------------------------------------------------------------
+ <xsl:choose>
+ <xsl:when test="personen/gruppe">
+ <xsl:for-each select="personen/gruppe">
+<xsl:text>
+</xsl:text> -------- <xsl:value-of select="@key"/> --------<xsl:text>
+</xsl:text>
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="personen">
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:for-each>
+
+ Generiert von Stud.IP Version <xsl:value-of select="@version"/>
+ </xsl:for-each>
+ </xsl:template>
+
+<xsl:template name="showperson">
+ <xsl:for-each select="person">
+ - <xsl:if test="titel">
+ <xsl:value-of select="titel"/><xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="vorname"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="nachname"/>
+ <xsl:if test="titel2">
+ <xsl:text>, </xsl:text><xsl:value-of select="titel2"/>
+ </xsl:if>
+ <xsl:if test="telefon">
+ Telefon: <xsl:value-of select="telefon"/>
+ </xsl:if>
+ <xsl:if test="raum">
+ Raum: <xsl:value-of select="raum"/>
+ </xsl:if>
+ <xsl:if test="sprechzeiten">
+ Sprechzeit: <xsl:value-of select="sprechzeiten"/>
+ </xsl:if>
+ <xsl:if test="email">
+ E-Mail: <xsl:value-of select="email"/>
+ </xsl:if>
+<xsl:text>
+</xsl:text>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template name="showseminar">
+ <xsl:for-each select="seminar">
+ Veranstaltung - <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each> - <xsl:value-of select="titel"/> -
+ <xsl:if test="untertitel">
+ Untertitel: <xsl:value-of select="untertitel"/>
+ </xsl:if>
+ Lehrende: <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ Termin: <xsl:value-of select="termine/termin"/>
+ Erster Termin: <xsl:value-of select="termine/erstertermin"/>
+ <xsl:if test="termine/vorbesprechung">
+ Vorbesprechung: <xsl:value-of select="termine/vorbesprechung"/>
+ </xsl:if>
+<xsl:text>
+</xsl:text>
+ <xsl:if test="status">
+ Status: <xsl:value-of select="status"/>
+ </xsl:if>
+ <xsl:if test="beschreibung">
+ Beschreibung: <xsl:value-of select="beschreibung"/>
+ </xsl:if>
+ <xsl:if test="raum">
+ Raum: <xsl:value-of select="raum"/>
+ </xsl:if>
+ <xsl:if test="sonstiges">
+ Sonstiges: <xsl:value-of select="sonstiges"/>
+ </xsl:if>
+ <xsl:if test="art">
+ Art der Veranstaltung: <xsl:value-of select="art"/>
+ </xsl:if>
+ <xsl:if test="teilnehmer">
+ Teilnahme: <xsl:value-of select="teilnehmer"/>
+ </xsl:if>
+ <xsl:if test="teilnehmerzahl"> <xsl:for-each select="teilnehmerzahl"><xsl:text>
+ </xsl:text><xsl:value-of select="@key"/> Anzahl Teilnehmende: <xsl:text> </xsl:text><xsl:value-of select="."/>
+ </xsl:for-each></xsl:if>
+ <xsl:if test="voraussetzung">
+ Voraussetzungen: <xsl:value-of select="voraussetzung"/>
+ </xsl:if>
+ <xsl:if test="lernorga">
+ Lernorganisation: <xsl:value-of select="lernorga"/>
+ </xsl:if>
+ <xsl:if test="schein">
+ Leistungsnachweis: <xsl:value-of select="schein"/>
+ </xsl:if>
+ <xsl:if test="ects">
+ ECTS: <xsl:value-of select="ects"/>
+ </xsl:if>
+ <xsl:if test="bereiche">
+ Bereich:
+<xsl:for-each select="bereiche/bereich"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text></xsl:for-each>
+ </xsl:if>
+ <xsl:if test="lvgruppen">
+ Module:
+<xsl:for-each select="lvgruppen/lvgruppe"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text></xsl:for-each>
+ </xsl:if>
+ <xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+<xsl:text> </xsl:text><xsl:value-of select="@key"/>: <xsl:value-of select="."/>
+ </xsl:for-each>
+ </xsl:if>
+<xsl:text>
+</xsl:text>
+ </xsl:for-each>
+</xsl:template>
+</xsl:stylesheet>
diff --git a/lib/export/txt-vp-2.xsl b/lib/export/txt-vp-2.xsl
new file mode 100644
index 0000000..f58e192
--- /dev/null
+++ b/lib/export/txt-vp-2.xsl
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <xsl:output method="text" encoding="UTF-8"/>
+ <xsl:template match="/">
+ <xsl:text>&#xFEFF;</xsl:text>
+ <xsl:for-each select="studip">
+ <xsl:for-each select="institut">
+<xsl:choose>
+ <xsl:when test="type"><xsl:value-of select="type"/></xsl:when>
+ <xsl:otherwise>Einrichtung</xsl:otherwise>
+</xsl:choose>: <xsl:value-of select="name"/>
+<xsl:if test="fakultaet">
+Fakultät: <xsl:value-of select="fakultaet"/>
+</xsl:if>
+<xsl:if test="homepage">
+Homepage: <xsl:value-of select="homepage"/>
+</xsl:if>
+<xsl:if test="strasse">
+Strasse: <xsl:value-of select="strasse"/>
+</xsl:if>
+<xsl:if test="plz">
+Postleitzahl: <xsl:value-of select="plz"/>
+</xsl:if>
+<xsl:if test="telefon">
+Telefon: <xsl:value-of select="telefon"/>
+</xsl:if>
+<xsl:if test="fax">
+Fax: <xsl:value-of select="fax"/>
+</xsl:if>
+<xsl:if test="email">
+E-mail: <xsl:value-of select="email"/>
+</xsl:if>
+<xsl:if test="datenfelder">
+<xsl:for-each select="datenfelder/datenfeld"><xsl:text>
+</xsl:text><xsl:value-of select="@key"/>: <xsl:value-of select="."/>
+</xsl:for-each>
+</xsl:if>
+<xsl:text>
+</xsl:text>
+<xsl:if test="seminare">
+Veranstaltungen
+ <xsl:choose>
+ <xsl:when test="seminare/gruppe">
+ <xsl:for-each select="seminare/gruppe">
+Gruppe: <xsl:value-of select="@key"/><xsl:text>
+</xsl:text>
+ <xsl:choose>
+ <xsl:when test="untergruppe">
+ <xsl:for-each select="untergruppe">
+Untergruppe:<xsl:value-of select="@key"/><xsl:text>
+</xsl:text>
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="showseminar"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="seminare">
+ <xsl:call-template name="showseminar"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="personen">
+MitarbeiterInnen
+ <xsl:choose>
+ <xsl:when test="personen/gruppe">
+ <xsl:for-each select="personen/gruppe">
+<xsl:text>
+</xsl:text><xsl:value-of select="@key"/><xsl:text>
+</xsl:text>
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="personen">
+ <xsl:call-template name="showperson"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:for-each>
+
+ Generiert von Stud.IP Version <xsl:value-of select="@version"/>
+ </xsl:for-each>
+ </xsl:template>
+
+<xsl:template name="showperson">
+ <xsl:for-each select="person">
+<xsl:if test="titel">
+ <xsl:value-of select="titel"/><xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="vorname"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="nachname"/>
+ <xsl:if test="titel2">
+ <xsl:text>, </xsl:text><xsl:value-of select="titel2"/>
+ </xsl:if>
+ <xsl:if test="telefon">
+Telefon: <xsl:value-of select="telefon"/>
+ </xsl:if>
+ <xsl:if test="raum">
+Raum: <xsl:value-of select="raum"/>
+ </xsl:if>
+ <xsl:if test="sprechzeiten">
+Sprechzeit: <xsl:value-of select="sprechzeiten"/>
+ </xsl:if>
+ <xsl:if test="email">
+E-Mail: <xsl:value-of select="email"/>
+ </xsl:if>
+<xsl:text>
+</xsl:text>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template name="showseminar">
+ <xsl:for-each select="seminar">
+Veranstaltung - <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each> - <xsl:value-of select="titel"/> -
+ <xsl:if test="untertitel">
+Untertitel: <xsl:value-of select="untertitel"/>
+ </xsl:if>
+Lehrende: <xsl:for-each select="dozenten/dozent">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+Termin: <xsl:value-of select="termine/termin"/>
+Erster Termin: <xsl:value-of select="termine/erstertermin"/>
+ <xsl:if test="termine/vorbesprechung">
+Vorbesprechung: <xsl:value-of select="termine/vorbesprechung"/>
+ </xsl:if>
+ <xsl:if test="status">
+Status: <xsl:value-of select="status"/>
+ </xsl:if>
+ <xsl:if test="beschreibung">
+Beschreibung: <xsl:value-of select="beschreibung"/>
+ </xsl:if>
+ <xsl:if test="raum">
+Raum: <xsl:value-of select="raum"/>
+ </xsl:if>
+ <xsl:if test="sonstiges">
+Sonstiges: <xsl:value-of select="sonstiges"/>
+ </xsl:if>
+ <xsl:if test="art">
+Art der Veranstaltung: <xsl:value-of select="art"/>
+ </xsl:if>
+ <xsl:if test="teilnehmer">
+Teilnahme: <xsl:value-of select="teilnehmer"/>
+ </xsl:if>
+ <xsl:if test="teilnehmerzahl"> <xsl:for-each select="teilnehmerzahl"><xsl:text>
+</xsl:text><xsl:value-of select="@key"/> Anzahl Teilnehmende: <xsl:value-of select="."/>
+ </xsl:for-each></xsl:if>
+ <xsl:if test="voraussetzung">
+Voraussetzungen: <xsl:value-of select="voraussetzung"/>
+ </xsl:if>
+ <xsl:if test="lernorga">
+Lernorganisation: <xsl:value-of select="lernorga"/>
+ </xsl:if>
+ <xsl:if test="schein">
+Leistungsnachweis: <xsl:value-of select="schein"/>
+ </xsl:if>
+ <xsl:if test="ects">
+ECTS: <xsl:value-of select="ects"/>
+ </xsl:if>
+ <xsl:if test="bereiche">
+Bereich:
+<xsl:for-each select="bereiche/bereich"><xsl:value-of select="."/><xsl:text>
+</xsl:text></xsl:for-each>
+ </xsl:if>
+ <xsl:if test="lvgruppen">
+Module:
+<xsl:for-each select="lvgruppen/lvgruppe"><xsl:value-of select="."/><xsl:text>
+</xsl:text></xsl:for-each>
+ </xsl:if>
+ <xsl:if test="datenfelder">
+ <xsl:for-each select="datenfelder/datenfeld">
+<xsl:value-of select="@key"/>: <xsl:value-of select="."/>
+ </xsl:for-each>
+ </xsl:if>
+<xsl:text>
+</xsl:text>
+ </xsl:for-each>
+</xsl:template>
+</xsl:stylesheet>