From e1e335debae712b390eb1587e182438d1a9738fb Mon Sep 17 00:00:00 2001
From: Max-Ferdinand Zeterberg <zeterberg@sub.uni-goettingen.de>
Date: Mon, 18 Mar 2024 16:38:24 +0100
Subject: [PATCH] feat(facsimile): add question marks for uncertainty

---
 scenarios/xslt/edxml2html/css/styles.css              |  7 +++++++
 scenarios/xslt/edxml2html/libs/html-facsimile.lib.xsl | 10 +++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/scenarios/xslt/edxml2html/css/styles.css b/scenarios/xslt/edxml2html/css/styles.css
index 0370eab..8f52136 100644
--- a/scenarios/xslt/edxml2html/css/styles.css
+++ b/scenarios/xslt/edxml2html/css/styles.css
@@ -326,6 +326,13 @@ hr.metamark-line.doubleLine {
 }
 
 /*::::::::::::::::::::::::::::::::::{ TEI: Transcriptional }::::::::::::::::::::::::::::::::*/
+
+.g[data-cert="uncertain"]:after {
+  content: "?";  
+  font-size: small;
+  vertical-align: super;
+}
+
 .surface .tei::before,
 .surface .tei::after {
     color: brown;
diff --git a/scenarios/xslt/edxml2html/libs/html-facsimile.lib.xsl b/scenarios/xslt/edxml2html/libs/html-facsimile.lib.xsl
index 39527a4..69ef76c 100644
--- a/scenarios/xslt/edxml2html/libs/html-facsimile.lib.xsl
+++ b/scenarios/xslt/edxml2html/libs/html-facsimile.lib.xsl
@@ -64,13 +64,21 @@
     
     
     <!-- LINE-PARTS -->
-    <xsl:template match="g">
+    <xsl:template match="g[not(@cert)]">        
         <span class="g" 
             id="{if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))}">
             <xsl:apply-templates/>
         </span>    
     </xsl:template>
     
+    <xsl:template match="g[@cert]">        
+        <span class="g"
+            data-cert="{@cert}"
+            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}"/>
-- 
GitLab