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

Add philology2html scripts

parent ebfecbb7
No related branches found
No related tags found
No related merge requests found
......@@ -1763,7 +1763,174 @@ insert.note.phil</String>
</documentTypeRule-array>
</field>
<field name="scenarios">
<scenario-array/>
<scenario-array>
<scenario>
<field name="advancedOptionsMap">
<null/>
</field>
<field name="name">
<String>edxml: Facsimile to HTML</String>
</field>
<field name="baseURL">
<String></String>
</field>
<field name="footerURL">
<String></String>
</field>
<field name="fOPMethod">
<String>pdf</String>
</field>
<field name="fOProcessorName">
<String>Apache FOP</String>
</field>
<field name="headerURL">
<String></String>
</field>
<field name="inputXSLURL">
<String>${framework}/scenarios/xslt/edxml2html/transcription2html.xsl</String>
</field>
<field name="inputXMLURL">
<String>${currentFileURL}</String>
</field>
<field name="defaultScenario">
<Boolean>false</Boolean>
</field>
<field name="isFOPPerforming">
<Boolean>false</Boolean>
</field>
<field name="type">
<String>XSL</String>
</field>
<field name="saveAs">
<Boolean>false</Boolean>
</field>
<field name="openInBrowser">
<Boolean>false</Boolean>
</field>
<field name="outputResource">
<null/>
</field>
<field name="openOtherLocationInBrowser">
<Boolean>false</Boolean>
</field>
<field name="locationToOpenInBrowserURL">
<null/>
</field>
<field name="openInEditor">
<Boolean>false</Boolean>
</field>
<field name="showInHTMLPane">
<Boolean>false</Boolean>
</field>
<field name="showInXMLPane">
<Boolean>true</Boolean>
</field>
<field name="showInSVGPane">
<Boolean>false</Boolean>
</field>
<field name="showInResultSetPane">
<Boolean>false</Boolean>
</field>
<field name="useXSLTInput">
<Boolean>true</Boolean>
</field>
<field name="xsltParams">
<list/>
</field>
<field name="cascadingStylesheets">
<String-array/>
</field>
<field name="xslTransformer">
<String>Saxon-PE</String>
</field>
<field name="extensionURLs">
<String-array/>
</field>
</scenario>
<scenario>
<field name="advancedOptionsMap">
<null/>
</field>
<field name="name">
<String>edxml: Philology to HTML</String>
</field>
<field name="baseURL">
<String></String>
</field>
<field name="footerURL">
<String></String>
</field>
<field name="fOPMethod">
<String>pdf</String>
</field>
<field name="fOProcessorName">
<String>Apache FOP</String>
</field>
<field name="headerURL">
<String></String>
</field>
<field name="inputXSLURL">
<String>${framework}/scenarios/xslt/edxml2html/philology2html.xsl</String>
</field>
<field name="inputXMLURL">
<String>${currentFileURL}</String>
</field>
<field name="defaultScenario">
<Boolean>false</Boolean>
</field>
<field name="isFOPPerforming">
<Boolean>false</Boolean>
</field>
<field name="type">
<String>XSL</String>
</field>
<field name="saveAs">
<Boolean>false</Boolean>
</field>
<field name="openInBrowser">
<Boolean>false</Boolean>
</field>
<field name="outputResource">
<null/>
</field>
<field name="openOtherLocationInBrowser">
<Boolean>false</Boolean>
</field>
<field name="locationToOpenInBrowserURL">
<null/>
</field>
<field name="openInEditor">
<Boolean>false</Boolean>
</field>
<field name="showInHTMLPane">
<Boolean>false</Boolean>
</field>
<field name="showInXMLPane">
<Boolean>true</Boolean>
</field>
<field name="showInSVGPane">
<Boolean>false</Boolean>
</field>
<field name="showInResultSetPane">
<Boolean>false</Boolean>
</field>
<field name="useXSLTInput">
<Boolean>true</Boolean>
</field>
<field name="xsltParams">
<list/>
</field>
<field name="cascadingStylesheets">
<String-array/>
</field>
<field name="xslTransformer">
<String>Saxon-PE</String>
</field>
<field name="extensionURLs">
<String-array/>
</field>
</scenario>
</scenario-array>
</field>
<field name="validationScenarios">
<validationScenario-array>
......@@ -1813,6 +1980,9 @@ insert.note.phil</String>
</field>
</validationUnitSchema>
</field>
<field name="validationAdvancedSettings">
<null/>
</field>
</validationUnit>
<validationUnit>
<field name="validationType">
......@@ -1857,6 +2027,9 @@ insert.note.phil</String>
</field>
</validationUnitSchema>
</field>
<field name="validationAdvancedSettings">
<null/>
</field>
</validationUnit>
</list>
</field>
......
This diff is collapsed.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -29,17 +29,15 @@
<line n="3"><part xml:id="line_1.15_I_3_1"><seg xml:id="seg_nd4_5h3_kyb"
>tṯṯkrn⸢n?</seg> . <seg xml:id="seg_ht1_wh3_kyb"
>ˁ?b?⸣dn</seg></part></line>
<line n="4"><part xml:id="line_1.15_I_4_1"><seg xml:id="seg_lsj_wh3_kyb">ˁm</seg> .
<seg xml:id="seg_tgs_wh3_kyb">krt</seg> . <seg
xml:id="seg_r4m_zh3_kyb">⸢m?⸣s⸢wnh⸣</seg></part></line>
<line n="5"><part xml:id="line_1.15_I_5_1"><seg xml:id="seg_mv5_zh3_kyb">arḫ</seg> .
<seg xml:id="seg_y5b_133_kyb">tzġ</seg> . <seg
xml:id="seg_u35_133_kyb">l</seg>
<seg xml:id="seg_mbb_b33_kyb">ˁgl⸢h⸣</seg></part></line>
<line n="6"><part xml:id="line_1.15_I_6_1"><seg xml:id="seg_sjh_b33_kyb">bn</seg> .
<seg xml:id="seg_ky4_b33_kyb">ḫ⸢pṯ</seg> .⸣ <seg
xml:id="seg_bbv_b33_kyb">l</seg>
<seg xml:id="seg_tkg_c33_kyb">umht⸢hm⸣</seg></part></line>
<line n="4"><part xml:id="line_1.15_I_4_1"><seg xml:id="seg_lsj_wh3_kyb">ˁm</seg> . <seg xml:id="seg_tgs_wh3_kyb">krt</seg> . <seg
xml:id="seg_r4m_zh3_kyb"><tei:damage degree="low">m?</tei:damage>s<tei:damage degree="low"
>wnh</tei:damage></seg></part></line>
<line n="5"><part xml:id="line_1.15_I_5_1"><seg xml:id="seg_mv5_zh3_kyb">arḫ</seg> . <seg xml:id="seg_y5b_133_kyb">tzġ</seg> .
<seg xml:id="seg_u35_133_kyb">l</seg>
<seg xml:id="seg_mbb_b33_kyb">ˁgl<tei:damage degree="low">h</tei:damage></seg></part></line>
<line n="6"><part xml:id="line_1.15_I_6_1"><seg xml:id="seg_sjh_b33_kyb">bn</seg> . <seg xml:id="seg_ky4_b33_kyb">ḫ⸢pṯ</seg> .⸣
<seg xml:id="seg_bbv_b33_kyb">l</seg>
<seg xml:id="seg_tkg_c33_kyb">umht<tei:damage degree="low">hm</tei:damage></seg></part></line>
<line n="7"><part xml:id="line_1.15_I_7_1"><seg xml:id="seg_vpd_d33_kyb">k</seg>
<seg xml:id="seg_gbl_d33_kyb">tn⸢ḥn⸣</seg> . <seg
xml:id="seg_i5t_d33_kyb">ud⸢m⸣m</seg></part></line>
......
:root {
--sub-blue: #003967;
--sub-blue-light: #aeb7c6;
--sub-blue-light-bg: rgba(174, 183, 198, 0.185);
--tech-font: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
--mono-font: monospace;
}
/*::::::::::::::::::::::::::::::::::{ EDXML: ANCHORS & LINKS }::::::::::::::::::::::::::::::::*/
.column-anchor,
.anchor {
text-decoration: none;
}
.column-anchor,
.anchor {
color: var(--sub-blue);
}
/*::::::::::::::::::::::::::::::::::{ EDXML: FACSIMILE }::::::::::::::::::::::::::::::::*/
/*----------------------------------{ FACSIMILE }--------------------------------*/
.facsimile,
.section {
margin: 3em 4em;
}
/*----------------------------------{ SURFACES }--------------------------------*/
.surface {
margin-bottom: 100px;
}
/*----------------------------------{ COLUMNS }--------------------------------*/
div.column {
margin-bottom: .8em;
}
.column .head .col-nr::before {
content: attr(data-roman-n);
}
/*::::::::::::::::::::::::::::::::::{ 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;
min-width: 4em;
}
.line-nr {
background-color: var(--sub-blue);
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
text-align: left;
margin-right: 1em;
padding: 0 .3em;
color: white;
}
.line-nr.calculated {
color: lightgray;
display: none;
}
.line:hover .line-nr {
background-color: var(--sub-blue-light);
color: var(--sub-blue);
}
.line:hover {
background-color: var(--sub-blue-light-bg);
}
/*----------------------------------{ 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::before {
position: absolute;
background: inherit;
font-family: var(--tech-font);
padding: 0 .3em 0 0;
color: var(--sub-blue);
}
hr.metamark-line::before {
content: "metamark";
}
hr.metamark-line[data-rend]::before {
content: attr(data-rend);
}
hr.metamark-line[data-rend='doubleLine']::before {
content: "Double Line";
}
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);
}
/*::::::::::::::::::::::::::::::::::{ EDXML: PHILOLOGY }::::::::::::::::::::::::::::::::*/
.unit-container {
display: flex;
flex-direction: row;
}
.unit-container > *:first-child {
width: 10%;
}
.unit-container > * {
width: 45%;
}
/*----------------------------------{ UNIT }--------------------------------*/
.philology .unit {
line-height: 1.8em;
}
.philology .unit:hover {
background-color: var(--sub-blue-light-bg);
}
.philology .unit .head {
display: inline-block;
/* display: none; */
}
.philology .unit .head.hide {
display: none;
}
.philology .unit .anchor .unit-nr::before {
margin-left: 10px;
content: attr(data-n);
display: none;
}
.philology .unit .anchor .unit-count {
margin-left: 10px;
}
/*----------------------------------{ LINEBREAKS }--------------------------------*/
.lb {
color: var(--sub-blue-light);
font-family: var(--tech-font);
/* position: relative;
vertical-align: top; */
}
.lb:before {
margin-right: .1em;
}
.lb:after {
margin-left: .1em;
}
.lb:before,
.lb:after {
content: "|";
}
/*----------------------------------{ PHRASES }--------------------------------*/
.phr {
}
/*----------------------------------{ ITEMS }--------------------------------*/
.item {
display: inline-block;
vertical-align: top;
}
.item {
border: 0px solid var(--sub-blue);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.item:not(:first-child) .value {
text-align: center;
}
.item .annotation {
display: none;
visibility: hidden;
opacity: 0;
height: 0;
overflow: hidden;
}
/*----------------------------------{ ITEMS: DISPLAY Annotations }--------------------------------*/
.unit:focus-within .item .annotation {
transition-property: visibility, opacity;
transition-delay: 1s;
display: block;
visibility: visible;
opacity: 1;
height: auto;
}
.unit:focus-within .item:hover {
background-color: unset;
color: unset;
}
.item .annotation {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
background-color: var(--sub-blue);
color: white;
}
.item .annotation > * {
display: block;
padding: 0 .3em ;
}
.item .annotation > span:hover {
background-color: var(--sub-blue-light);
color: var(--sub-blue);
}
/*----------------------------------{ ITEMS: WORDS }--------------------------------*/
.item.w:hover {
background-color: var(--sub-blue);
color: white;
}
/*::::::::::::::::::::::::::::::::::{ 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:template match="facsimile">
<div class="facsimile section"
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">
<a href="#{$id}" class="column-anchor">
Col. <span class="col-nr" data-n="{$nr}" data-roman-n="{$roman-nr}"><!--<xsl:value-of select="$nr"/>--></span>
</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)"/>
<xsl:variable name="id" select="if(@xml:id) then (@xml:id) else ('line_'||generate-id(.))"/>
<div class="line"
id="{$id}">
<a href="#{$id}" class="line-anchor">
<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>
</a>
<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}" data-rend="{$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>
</xsl:stylesheet>
\ 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:template match="@xml:lang">
<xsl:attribute name="data-lang"><xsl:value-of select="data(.)"/></xsl:attribute>
</xsl:template>
<xsl:template match="@n">
<xsl:attribute name="data-n"><xsl:value-of select="data(.)"/></xsl:attribute>
<!--<xsl:attribute name="data-roman-n"><xsl:number value="data(.)" format="I"/></xsl:attribute>-->
</xsl:template>
<xsl:template match="philology">
<div class="philology section"
id="{if(@xml:id) then (@xml:id) else ('facs_'||generate-id(.))}">
<xsl:apply-templates />
</div>
</xsl:template>
<xsl:template match="philology/units">
<div class="units">
<xsl:apply-templates />
<!--<table>
<xsl:apply-templates mode="table"/>
</table>-->
</div>
</xsl:template>
<xsl:template match="philology//unit">
<xsl:variable name="id" select="if(@xml:id) then (@xml:id) else ('facs_'||generate-id(.))"/>
<xsl:variable name="corresp" select="if(@corresp) then (tokenize(@corresp, ' ')) else (false())"/>
<div class="unit" id="{$id}" data-corresp="{$corresp}">
<!--<h2 class="head hide">
<a class="anchor" href="#{$id}">
<span class="unit-label">Kolon</span>
<span class="unit-nr"><xsl:apply-templates select="@n"/></span>
</a>
</h2>-->
<div class="container unit-container">
<div class="anchor-container">
<a class="anchor" href="#{$id}">
<span class="unit-label">Kolon</span>
<span class="unit-nr">
<xsl:apply-templates select="@n"/>
<xsl:attribute name="data-count-preceding"><xsl:value-of select="count(preceding::unit)+1"/></xsl:attribute>
<xsl:attribute name="data-count-preceding-sibling"><xsl:value-of select="count(preceding-sibling::unit)+1"/></xsl:attribute>
</span>
<span class="unit-count">
<xsl:value-of select="count(preceding::unit)+1"/>
</span>
</a>
</div>
<xsl:apply-templates />
</div>
</div>
</xsl:template>
<xsl:template match="philology//unit" mode="table">
<xsl:variable name="id" select="if(@xml:id) then (@xml:id) else ('facs_'||generate-id(.))"/>
<xsl:variable name="corresp" select="if(@corresp) then (tokenize(@corresp, ' ')) else (false())"/>
<tr class="unit" id="{$id}" data-corresp="{$corresp}">
<td class="head hide">
<a class="anchor" href="#{$id}">
<span class="unit-label">Kolon</span>
<span class="unit-nr"><xsl:apply-templates select="@n"/></span>
</a>
</td>
<xsl:apply-templates mode="table" select="transcription"/>
<xsl:apply-templates mode="table" select="translation"/>
</tr>
</xsl:template>
<xsl:template match="philology//transcription">
<div class="transcription section-tab">
<xsl:apply-templates select="@*|node()"/>
</div>
</xsl:template>
<xsl:template match="transcription/@type">
<xsl:attribute name="data-type"><xsl:value-of select="data(.)"/></xsl:attribute>
</xsl:template>
<xsl:template match="philology//transcription" mode="table">
<td class="transcription section-tab">
<xsl:apply-templates select="@*"/>
<table>
<tr>
<xsl:for-each select="node()[not(normalize-space(.)='')]">
<xsl:apply-templates select="." mode="table-items"/>
</xsl:for-each>
</tr>
</table>
</td>
</xsl:template>
<xsl:template match="philology//translation">
<div class="translation section-tab container">
<xsl:apply-templates select="@*|node()"/>
</div>
</xsl:template>
<xsl:template match="philology//translation" mode="table">
<td class="translation section-tab container">
<xsl:apply-templates select="@*|node()"/>
</td>
</xsl:template>
<xsl:template match="translation/element()|transcription/element()">
<span class="{local-name()} item">
<span class="conti">
<xsl:apply-templates/>
</span>
</span>
</xsl:template>
<xsl:template match="translation/text()[not(normalize-space(.)='')]|transcription/text()[not(normalize-space(.)='')]">
<span class="text item">
<xsl:value-of select="."/>
</span>
</xsl:template>
<xsl:template match="philology//lb[@n]">
<span class="lb item">
<xsl:value-of select="data(@n)"/>
</span>
</xsl:template>
<xsl:template match="philology//phr">
<xsl:variable name="id" select="if(@xml:id) then (@xml:id) else ('facs_'||generate-id(.))"/>
<xsl:variable name="corresp" select="if(@corresp) then (tokenize(@corresp, ' ')) else (false())"/>
<span class="phr container" id="{$id}">
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="philology//w">
<xsl:variable name="id" select="if(@xml:id) then (@xml:id) else ('facs_'||generate-id(.))"/>
<xsl:variable name="corresp" select="if(@corresp) then (tokenize(@corresp, ' ')) else (false())"/>
<span class="w item" tabindex="1" id="{$id}">
<span class="body">
<xsl:apply-templates/>
</span>
<span class="annotation">
<span class="ana">
<xsl:choose>
<xsl:when test="@ana">
<xsl:value-of select="@ana"/>
</xsl:when>
<xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise>
</xsl:choose>
</span>
<span class="lemma">
<xsl:choose>
<xsl:when test="@lemma">
<xsl:value-of select="@lemma"/>
</xsl:when>
<xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise>
</xsl:choose>
</span>
</span>
</span>
</xsl:template>
<!-- TABLE ITEMS -->
<xsl:template match="node()" mode="table-items">
<td class="{local-name()}">
<xsl:apply-templates/>
</td>
</xsl:template>
<xsl:template match="philology//lb" mode="table-items">
<td class="lb">
<xsl:apply-templates select="@*"/>
</td>
</xsl:template>
<xsl:template match="philology//phr" mode="table-items">
<xsl:variable name="id" select="if(@xml:id) then (@xml:id) else ('facs_'||generate-id(.))"/>
<xsl:variable name="corresp" select="if(@corresp) then (tokenize(@corresp, ' ')) else (false())"/>
<td class="phr" id="{$id}">
<table>
<tr>
<xsl:apply-templates mode="table-items"/>
</tr>
</table>
</td>
</xsl:template>
<xsl:template match="philology//w" mode="table-items">
<xsl:variable name="id" select="if(@xml:id) then (@xml:id) else ('facs_'||generate-id(.))"/>
<xsl:variable name="corresp" select="if(@corresp) then (tokenize(@corresp, ' ')) else (false())"/>
<td class="w item" tabindex="1" id="{$id}">
<span class="ana">
<xsl:choose>
<xsl:when test="@ana">
<xsl:value-of select="@ana"/>
</xsl:when>
<xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise>
</xsl:choose>
</span>
<span class="lemma">
<xsl:choose>
<xsl:when test="@lemma">
<xsl:value-of select="@lemma"/>
</xsl:when>
<xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise>
</xsl:choose>
</span>
<span class="value">
<xsl:apply-templates/>
</span>
</td>
</xsl:template>
</xsl:stylesheet>
\ 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: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
<?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:include href="libs/html-philology.lib.xsl"/>
<xsl:include href="libs/html-tei.lib.xsl"/>
<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/edxml2html/css/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="philology"/>
</xsl:template>
</xsl:stylesheet>
\ 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:include href="libs/html-facsimile.lib.xsl"/>
<xsl:include href="libs/html-tei.lib.xsl"/>
<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('css/styles.css')"></xsl:copy-of>
</style>-->
<link rel="stylesheet" href="/home/sikora/ownCloud/job/projekte/sub_DigiEdi/sub_eupt/xml samples/scenarios/xslt/edxml2html/css/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: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