From e49b9cb5b72696b3fcd7c57a2c0f0d1f6616fee4 Mon Sep 17 00:00:00 2001 From: Max-Ferdinand Zeterberg <zeterberg@sub.uni-goettingen.de> Date: Fri, 26 Apr 2024 14:29:46 +0200 Subject: [PATCH] fix(notes): simplify representation of notes --- .../edxml2html/libs/html-philology.lib.xsl | 23 ++----------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/scenarios/xslt/edxml2html/libs/html-philology.lib.xsl b/scenarios/xslt/edxml2html/libs/html-philology.lib.xsl index 1e95788..a64a207 100644 --- a/scenarios/xslt/edxml2html/libs/html-philology.lib.xsl +++ b/scenarios/xslt/edxml2html/libs/html-philology.lib.xsl @@ -227,27 +227,8 @@ </xsl:template> <xsl:template match="philology//notes"> - <xsl:variable name="targets" select="note/@target"/> - <xsl:variable name="targetsUnique" select="distinct-values($targets)"/> - <xsl:variable name="thisNotes" select="."/> - <ul> - <xsl:for-each select="$targetsUnique"> - <li class="note-list"> - <xsl:variable name="targetUnique" select="."/> - <xsl:variable name="noteListId" select="concat(generate-id($thisNotes), '-', .)"/> - <label for="{$noteListId}"> - <xsl:variable name="targetIds" select="tokenize($targetUnique, ' ')"/> - <xsl:for-each select="$targetIds"> - <xsl:variable name="targetId" select="substring(., 2)"/> - <xsl:apply-templates select="root($thisNotes)//*[@xml:id = $targetId]"/> - </xsl:for-each> - </label> - <input id="{$noteListId}" type="checkbox"/> - <ul> - <xsl:apply-templates select="$thisNotes//note[@target = $targetUnique]"/> - </ul> - </li> - </xsl:for-each> + <ul> + <xsl:apply-templates select=".//note"/> </ul> </xsl:template> -- GitLab