Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
EOASkripts/src/stylesheets/tei2html/tei2html.xsl
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
105 lines (100 sloc)
3.96 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<xsl:stylesheet | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:tei="http://www.tei-c.org/ns/1.0" | |
xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
xmlns:eoa="http://www.edition-open-access.de/ns" | |
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> |