Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kthoden committed Dec 16, 2020
0 parents commit 5d71f79
Show file tree
Hide file tree
Showing 27 changed files with 3,706 additions and 0 deletions.
11 changes: 11 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project default="xar" name="EOA">
<xmlproperty file="expath-pkg.xml"/>
<property name="project.version" value="${package(version)}"/>
<property name="project.app" value="EOA"/>
<property name="build.dir" value="build"/>
<target name="xar">
<mkdir dir="${build.dir}"/>
<zip basedir="." destfile="${build.dir}/${project.app}-${project.version}.xar" excludes="${build.dir}/*"/>
</target>
</project>
5 changes: 5 additions & 0 deletions expath-pkg.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://expath.org/ns/pkg" name="https://edition-open-access.de/eoaxmldb" abbrev="EOA" version="0.1" spec="1.0">
<title>Edition Open Access Publication Platform</title>
<dependency package="http://exist-db.org/apps/shared"/>
</package>
682 changes: 682 additions & 0 deletions publications/studies/125/tei_part.xml

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions repo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<meta xmlns="http://exist-db.org/xquery/repo">
<description>EOA XML db eXist app</description>
<author>Klaus Thoden</author>
<author>Samuel Gfrörer</author>
<website>https://github.molgen.mpg.de/EditionOpenAccess</website>
<status>beta</status>
<license>MIT</license>
<copyright>true</copyright>
<type>application</type>
<target>eoa</target>
<prepare/>
<finish/>
<permissions user="admin" group="dba" mode="rw-rw-r--"/>
<deployed>2020-12-16T15:48:33.321+01:00</deployed>
</meta>
8 changes: 8 additions & 0 deletions xml/aux/translations.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<translations>
<entry name="footnotes" en="Footnotes" de="Fußnoten" fr="notes en bas de page" it="Note a piè pagina"/>
<entry name="and" en="and" de="und" fr="et" it="e"/>
<entry name="editor-abbr" en="ed." de="Hrsg." fr="éd." it="cur."/>
<entry name="editors-abbr" en="eds." de="Hrsg." fr="éd." it="cur."/>
<entry name="fig" en="Fig." de="Abb." fr="Fig." it="Fig."/>
</translations>
25 changes: 25 additions & 0 deletions xml/stylesheets/example_fullpage.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">

<xsl:output method="html" encoding="UTF-8" indent="yes"/>

<xsl:template match="/">
<html>
<head>
<title>author list</title>
</head>
<body>
<xsl:apply-templates select="info"/>
</body>
</html>
</xsl:template>

<xsl:template match="info">
<ul>
<xsl:for-each select="author">
<li> <xsl:value-of select="."/> </li>
</xsl:for-each>
</ul>
</xsl:template>

</xsl:stylesheet>
18 changes: 18 additions & 0 deletions xml/stylesheets/example_list.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">

<xsl:output method="html" encoding="UTF-8" indent="yes"/>

<xsl:template match="/">
<xsl:apply-templates select="info"/>
</xsl:template>

<xsl:template match="info">
<ul>
<xsl:for-each select="author">
<li> <xsl:value-of select="."/> </li>
</xsl:for-each>
</ul>
</xsl:template>

</xsl:stylesheet>
68 changes: 68 additions & 0 deletions xml/stylesheets/series.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0" version="2.0" exclude-result-prefixes="tei">

<xsl:output doctype-system="about:legacy-compat" method="html" encoding="UTF-8" indent="yes"/>

<xsl:template match="/">
<!-- <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html&gt;</xsl:text> -->
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Publications</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="shortcut icon" href="static/assets/images/favicon.png"/>
<link rel="apple-touch-icon" href="static/assets/images/favicon-apple.png"/>
<link href="static/app.css" rel="stylesheet"/>
</head>
<body>
<div class="page">
<xsl:apply-templates select="//tei:body"/>
<footer class="footer">
<div class="footer__content">
<div class="footer-menu">
<a href="contact/index.html">Contact</a>
<a href="imprint/index.html">Imprint</a>
</div>
<div class="footer-logo">
<a href="https://mpiwg-berlin.mpg.de/">
<h2>Max Planck Institute for the History of Science</h2>
</a>
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="static/app.js"/>
</body>
</html>
</xsl:template>

<xsl:template match="//tei:body">
<xsl:for-each select="tei:div[@type='series']">
<h1> <xsl:value-of select="tei:head"/> </h1>
<xsl:for-each select="tei:biblStruct/tei:monogr">
<h2>
<xsl:value-of select="../../tei:head"/>
<xsl:text> </xsl:text>
<xsl:value-of select="tei:biblScope"/>
<xsl:text> </xsl:text>
<xsl:value-of select="tei:title"/>
</h2>
<p>
<xsl:value-of select="tei:author"/>
</p>
<xsl:apply-templates select="tei:note[@type='abstract']"/>
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:text>http://localhost:8002/</xsl:text>
<xsl:value-of select="lower-case(../../tei:head)"/>
<xsl:text>/</xsl:text>
<xsl:value-of select="tei:biblScope"/>
<xsl:text>/index.html</xsl:text>
</xsl:attribute>
<xsl:text>More</xsl:text>
</xsl:element>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
77 changes: 77 additions & 0 deletions xml/stylesheets/tei2html/tei2html.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:eoa="http://www.edition-open-access.de/ns" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs tei eoa" version="2.0">
<xsl:output method="html" encoding="UTF-8" indent="yes"/>

<xsl:include href="tei2html_publ_frontpage_utils.xsl"/>
<xsl:include href="tei2html_chapter_utils.xsl"/>
<xsl:include href="utils/html_container.xsl"/>
<xsl:include href="utils/html_inline.xsl"/>
<xsl:include href="utils/common.xsl"/>
<xsl:include href="utils/print.xsl"/>
<xsl:include href="utils/render.xsl"/>
<xsl:include href="utils/numbering.xsl"/>
<xsl:include href="utils/index.xsl"/>

<xsl:param name="output_dir" as="xs:string" select="'./output'"/>
<xsl:param name="webdesign_url" as="xs:string" select="'/static/webdesign_platform'"/>
<xsl:param name="publ_static_url" as="xs:string" select="'/static/publications'"/>
<xsl:param name="intermediate_dir" as="xs:string?" select="eoa:conc_path($output_dir, 'intermediate')"/>
<xsl:param name="nav_items" as="element(eoa:entry)*">
<eoa:entry active="1">
<eoa:link>
<xsl:text>#</xsl:text>
</eoa:link>
<eoa:title>Publications</eoa:title>
</eoa:entry>
</xsl:param>
<xsl:param name="platform_name" as="xs:string" select="'dummy-platform'"/>
<xsl:param name="platform_uri" as="xs:string" select="'http://dummy-platform.com'"/>
<xsl:param name="aux_uri" as="xs:string" select="'../../../data/aux'"/>

<!--
<xsl:param name="verbosity" as="xs:integer" required="no" select="0"/>
-->

<xsl:template match="/">
<xsl:sequence select="eoa:info(concat('platform name: ', $platform_name))"/>
<xsl:sequence select="eoa:info(concat('platform uri: ', $platform_uri))"/>
<xsl:variable name="output_subdir" as="xs:string">
<xsl:value-of select="eoa:conc_path3($output_dir, $series, $publication_number)"/>
</xsl:variable>
<xsl:variable name="indices" as="element(eoa:index)*">
<xsl:variable name="ctxt" select="."/>
<xsl:for-each select="$index_types">
<xsl:variable name="index_type" as="xs:string" select="."/>
<xsl:for-each select="$ctxt">
<xsl:call-template name="create_index">
<xsl:with-param name="indextype" select="$index_type"/>
</xsl:call-template>
</xsl:for-each>
</xsl:for-each>
</xsl:variable>
<xsl:if test="$intermediate_dir">
<xsl:result-document method="xml" encoding="UTF-8" indent="yes" href="{eoa:conc_path($intermediate_dir, 'indices.xml')}">
<xsl:copy-of select="$indices"/>
</xsl:result-document>
</xsl:if>
<xsl:result-document method="html" encoding="UTF-8" include-content-type="yes" indent="yes" href="{eoa:conc_path($output_subdir, 'index.html')}">
<xsl:call-template name="render_publication_frontpage">
<xsl:with-param name="webdesign_url" select="eoa:conc_path('../..', $webdesign_url)"/>
<xsl:with-param name="publ_static_url" as="xs:string" select="eoa:conc_path( '../..', $publ_static_url)"/>
<xsl:with-param name="nav_items" as="element(eoa:entry)*" select="$nav_items"/>
<xsl:with-param name="indices" as="element(eoa:index)*" select="$indices"/>
</xsl:call-template>
</xsl:result-document>
<xsl:for-each select="//tei:div[@type='chapter']">
<xsl:result-document method="html" encoding="UTF-8" include-content-type="yes" indent="yes" href="{eoa:conc_path3($output_subdir, xs:string(position()), 'index.html')}">
<xsl:call-template name="render_chapter">
<xsl:with-param name="webdesign_url" select="eoa:conc_path('../../..', $webdesign_url)"/>
<xsl:with-param name="publ_static_url" as="xs:string" select="eoa:conc_path( '../../..', $publ_static_url)"/>
<xsl:with-param name="nav_items" as="element(eoa:entry)*" select="$nav_items"/>
<xsl:with-param name="indices" as="element(eoa:index)*" select="$indices"/>
</xsl:call-template>
</xsl:result-document>
</xsl:for-each>
</xsl:template>

</xsl:stylesheet>
58 changes: 58 additions & 0 deletions xml/stylesheets/tei2html/tei2html_chapter.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:eoa="http://www.edition-open-access.de/ns" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs tei eoa" version="2.0">

<xsl:param name="webdesign_url" as="xs:string" select="'/webdesign_platform'"/>
<xsl:param name="publ_static_url" as="xs:string" select="'/static'"/>
<xsl:param name="nav_items" as="element(eoa:entry)*">
<eoa:entry active="1">
<eoa:link>
<xsl:text>#</xsl:text>
</eoa:link>
<eoa:title>Publications</eoa:title>
</eoa:entry>
</xsl:param>
<xsl:param name="chapter_nr" as="xs:integer" required="1"/>
<xsl:param name="platform_name" as="xs:string" select="'dummy-platform'"/>
<xsl:param name="platform_uri" as="xs:string" select="'http://dummy-platform.com'"/>
<xsl:param name="aux_uri" as="xs:string" select="../../../data/aux"/>

<xsl:output method="html" encoding="UTF-8"/>

<xsl:include href="tei2html_chapter_utils.xsl"/>
<xsl:include href="utils/html_container.xsl"/>
<xsl:include href="utils/html_inline.xsl"/>
<xsl:include href="utils/common.xsl"/>
<xsl:include href="utils/print.xsl"/>
<xsl:include href="utils/render.xsl"/>
<xsl:include href="utils/numbering.xsl"/>
<xsl:include href="utils/index.xsl"/>

<xsl:template match="/">
<xsl:variable name="indices" as="element(eoa:index)*">
<xsl:variable name="ctxt" select="."/>
<xsl:for-each select="$index_types">
<xsl:variable name="index_type" as="xs:string" select="."/>
<xsl:for-each select="$ctxt">
<xsl:call-template name="create_index">
<xsl:with-param name="indextype" select="$index_type"/>
</xsl:call-template>
</xsl:for-each>
</xsl:for-each>
</xsl:variable>
<xsl:for-each select="(//tei:div[@type='chapter'])[position() = $chapter_nr]">
<xsl:variable name="heading">
<xsl:for-each select="tei:head">
<xsl:call-template name="render_heading"/>
</xsl:for-each>
</xsl:variable>
<xsl:sequence select="eoa:info(concat('printing chapter ', $chapter_nr, '. head: ', $heading))"/>
<xsl:call-template name="render_chapter">
<xsl:with-param name="webdesign_url" select="$webdesign_url"/>
<xsl:with-param name="publ_static_url" select="$publ_static_url"/>
<xsl:with-param name="nav_items" as="element(eoa:entry)*" select="$nav_items"/>
<xsl:with-param name="indices" as="element(eoa:index)*" select="$indices"/>
</xsl:call-template>
</xsl:for-each>
</xsl:template>

</xsl:stylesheet>
Loading

0 comments on commit 5d71f79

Please sign in to comment.