Skip to content
Snippets Groups Projects
Commit cc4f79dd authored by usikora's avatar usikora :monkey:
Browse files

moved conversion files

parent 1f727d32
No related branches found
No related tags found
No related merge requests found
:root {
--sub-blue: #003967;
}
/*----------------------------------{ FACSIMILE }--------------------------------*/
.facsimile {
margin: 3em 4em;
}
/*----------------------------------{ SURFACES }--------------------------------*/
.surface {
margin-bottom: 100px;
}
/*----------------------------------{ COLUMNS }--------------------------------*/
div.column {
margin-bottom: .8em;
}
.column .head .col-nr::before {
content: attr(data-roman-n);
}
.column-anchor {
text-decoration: none;
margin-left: .5em;
}
.column-anchor::before {
content: "🔗";
font-size: smaller;
}
/*::::::::::::::::::::::::::::::::::{ LINE-LEVEL }::::::::::::::::::::::::::::::::*/
.surface .line,
.surface .note {
line-height: 1.5em;
}
.surface .line:not(:last-child),
.surface .note:not(:last-child) {
margin-bottom: .3em;
}
/*----------------------------------{ LINES }--------------------------------*/
.line-nr {
display: inline-block;
width: 3.5em;
}
.line-nr {
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
text-align: left;
margin-right: 1em;
color: var(--sub-blue);
}
.line-nr.calculated {
color: lightgray;
display: none;
}
/*----------------------------------{ NOTES }--------------------------------*/
.surface .note {
}
/*::::::::::::::::::::::::::::::::::{ PARTS & SEGMENTS }::::::::::::::::::::::::::::::::*/
/*----------------------------------{ SEGMENTS }--------------------------------*/
span.seg{
padding-left:0.15em;
padding-right:0.15em;
}
span.seg:hover{
/* background-color: rgba(165, 42, 42, 0.150); */
/* background-color: rgba(0, 57, 103, 0.150); */
background-color: var(--sub-blue);
color: white !important;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
/*----------------------------------{ METAMARKS }--------------------------------*/
hr.metamark-line {
display: block;
background-color:white;
margin:0 0 45px 0;
/* max-width:600px; */
border-width:0;
}
hr.metamark-line.line {
height:4px;
border-top:1px solid var(--sub-blue);
}
hr.metamark-line.doubleLine {
height:4px;
border-top:1px solid var(--sub-blue);
border-bottom:1px solid var(--sub-blue);
}
/*::::::::::::::::::::::::::::::::::{ TEI: Transcriptional }::::::::::::::::::::::::::::::::*/
.surface .tei::before,
.surface .tei::after {
color: brown;
}
.seg:hover .tei::before,
.seg:hover .tei::after {
color: white;
}
.tei.add::before { content: "("; }
.tei.add::after { content: ")"; }
/* corr::before { content: "<"; }
corr::after { content: ">"; } */
.tei.sic::before { content: "!(Text:"; }
.tei.sic::after { content: ")"; }
/* choice > sic:not(:last-child) {
display: none;
} */
.tei.damage::before { content: "["; }
.tei.damage::after { content: "]"; }
.tei.damage[data-degree=low]::before {
content: "⸢";
}
.tei.damage[data-degree=low]::after {
content: "⸣";
}
.tei.damage[data-degree=medium]::before {
content: "⌈";
}
.tei.damage[data-degree=medium]::after {
content: "⌉";
}
.tei.del::before { content: "[["; }
.tei.del::after { content: "]]"; }
.tei.supplied::before { content: "<"; }
.tei.supplied::after { content: ">"; }
.tei.surplus::before { content: "{"; }
.tei.surplus::after { content: "}"; }
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tei="http://www.tei-c.org/ns/1.0"
xmlns="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="xs"
version="2.0" xpath-default-namespace="http://sub.uni-goettingen.de/edxml#">
<xsl:output indent="yes"/>
<xsl:template match="/">
<html lang="en-US">
<head>
<meta charset="utf-8"/>
<title><xsl:apply-templates select="edxml/header/title"/></title>
<style>
<xsl:copy-of select="unparsed-text('styles.css')"></xsl:copy-of>
</style>
<!--<link rel="stylesheet" href="/home/sikora/ownCloud/job/projekte/sub_DigiEdi/sub_eupt/xml samples/scenarios/xslt/styles.css"></link> -->
</head>
<body>
<xsl:apply-templates select="edxml/text"/>
</body>
</html>
</xsl:template>
<xsl:template match="header"/>
<xsl:template match="text">
<xsl:apply-templates select="facsimile"/>
</xsl:template>
<xsl:template match="facsimile">
<div class="facsimile"
id="{if(@xml:id) then (@xml:id) else ('facs_'||generate-id(.))}">
<xsl:apply-templates />
</div>
</xsl:template>
<xsl:template match="surface">
<div class="surface"
id="{if(@xml:id) then (@xml:id) else ('surf_'||generate-id(.))}">
<xsl:apply-templates />
</div>
</xsl:template>
<xsl:template match="column">
<xsl:variable name="nr" select="if(@n) then(@n) else(count(preceding::column)+1)"/>
<xsl:variable name="roman-nr">
<xsl:number value="$nr" format="I"/>
</xsl:variable>
<xsl:variable name="id" select="if(@xml:id) then (@xml:id) else ('colu_'||generate-id(.))"/>
<div class="column"
id="{$id}"
data-n="{$nr}">
<h2 class="head">Col.
<span class="col-nr" data-n="{$nr}" data-roman-n="{$roman-nr}"><!--<xsl:value-of select="$nr"/>--></span>
<a href="#{$id}" class="column-anchor"></a>
</h2>
<xsl:apply-templates />
</div>
</xsl:template>
<xsl:template match="line[not(@n)]|surface//note">
<div class="note"
id="{if(@xml:id) then (@xml:id) else ('line_'||generate-id(.))}">
<xsl:apply-templates />
</div>
</xsl:template>
<xsl:template match="line[@n]">
<xsl:variable name="nr" select="@n"/>
<xsl:variable name="auto-nr" select="if($nr) then($nr) else(count(preceding::line)+1)"/>
<div class="line"
id="{if(@xml:id) then (@xml:id) else ('line_'||generate-id(.))}">
<span>
<xsl:choose>
<xsl:when test="@n">
<xsl:attribute name="class">line-nr explicit</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="class">line-nr calculated</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="$auto-nr"/>
</span>
<span class="line-body">
<xsl:apply-templates />
</span>
</div>
</xsl:template>
<!-- LINE-PARTS -->
<xsl:template match="g">
<span class="g"
id="{if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))}">
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="metamark[contains(@rend, 'Line') or contains(@rend, 'line')]">
<xsl:variable name="rend" select="@rend"/>
<hr class="metamark-line {$rend}"/>
</xsl:template>
<xsl:template match="line//part">
<span class="part"
id="{if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))}">
<xsl:apply-templates />
</span>
</xsl:template>
<xsl:template match="line//seg">
<span class="seg"
id="{if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))}">
<xsl:apply-templates />
</span>
</xsl:template>
<!-- TEI: TEI-Transcriptional -->
<xsl:template match="tei:*">
<span class="tei {local-name()}"
id="{if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))}">
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="tei:damage">
<span class="tei damage"
id="{if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))}"
data-degree="{if (@degree) then (@degree) else ('medium')}">
<xsl:apply-templates/>
</span>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment