diff --git a/scenarios/xslt/edxml2html/css/styles.css b/scenarios/xslt/edxml2html/css/styles.css index 2b6907193800be86126a99395d49e1779150884d..6b6182a1d3e5e60b5c7fd33e508c23ef0216232b 100644 --- a/scenarios/xslt/edxml2html/css/styles.css +++ b/scenarios/xslt/edxml2html/css/styles.css @@ -227,6 +227,20 @@ hr.metamark-line.doubleLine { } +/*----------------------------------{ HIGHLIGHTINGS }--------------------------------*/ + +.bold { + font-weight: bold; +} + +.italics { + font-style: italic; +} + +.under { + text-decoration: underline; +} + /*----------------------------------{ ITEMS }--------------------------------*/ .item { vertical-align: top; diff --git a/scenarios/xslt/edxml2html/libs/html-shared-templates.xsl b/scenarios/xslt/edxml2html/libs/html-shared-templates.xsl new file mode 100644 index 0000000000000000000000000000000000000000..75fbfc79db0bae296b85f42e39b4a8ef597e98c6 --- /dev/null +++ b/scenarios/xslt/edxml2html/libs/html-shared-templates.xsl @@ -0,0 +1,53 @@ +<?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="http://www.w3.org/1999/xhtml" + exclude-result-prefixes="xs" + version="2.0" xpath-default-namespace="http://sub.uni-goettingen.de/edxml#"> + + <!-- Highlightings --> + + <xsl:template match="hi[@rend='italics']|hi[not(@rend)]"> + <span class="hi italics" + id="{if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))}"> + <xsl:apply-templates/> + </span> + </xsl:template> + + <xsl:template match="hi[@rend='bold']"> + <span class="hi bold" + id="{if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))}"> + <xsl:apply-templates/> + </span> + </xsl:template> + + <xsl:template match="hi[@rend='sub']"> + <sub class="hi sub" + id="{if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))}"> + <xsl:apply-templates/> + </sub> + </xsl:template> + + <xsl:template match="hi[@rend='super']"> + <sup class="hi sup" + id="{if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))}"> + <xsl:apply-templates/> + </sup> + </xsl:template> + + <xsl:template match="hi[@rend='under']"> + <span class="hi under" + id="{if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))}"> + <xsl:apply-templates/> + </span> + </xsl:template> + + <!-- Paragraphs --> + + <xsl:template match="p"> + <p id="{if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))}"> + <xsl:apply-templates/> + </p> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/scenarios/xslt/edxml2html/philology2html.xsl b/scenarios/xslt/edxml2html/philology2html.xsl index 660ef6d8a29bc204805397568afd9bc459b6fc16..35d412b2274ab31fc9fd88961f5f1ead801acb55 100644 --- a/scenarios/xslt/edxml2html/philology2html.xsl +++ b/scenarios/xslt/edxml2html/philology2html.xsl @@ -7,6 +7,7 @@ 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-shared-templates.xsl"/> <xsl:include href="libs/html-tei.lib.xsl"/> <xsl:output indent="yes"/> diff --git a/scenarios/xslt/edxml2html/transcription2html.xsl b/scenarios/xslt/edxml2html/transcription2html.xsl index 06d71acdb19b9509434eca09deeeb38ae57cf84f..f497bbda8d2dbcfb5625867eabf1ac63b00ea316 100644 --- a/scenarios/xslt/edxml2html/transcription2html.xsl +++ b/scenarios/xslt/edxml2html/transcription2html.xsl @@ -5,6 +5,7 @@ xpath-default-namespace="http://sub.uni-goettingen.de/edxml#"> <xsl:include href="libs/html-facsimile.lib.xsl"/> + <xsl:include href="libs/html-shared-templates.xsl"/> <xsl:include href="libs/html-tei.lib.xsl"/> <xsl:output indent="yes"/>