From b1b6e8b9441dc7cba8094fabe8d6eb47d1092c44 Mon Sep 17 00:00:00 2001 From: Martin de la Iglesia <iglesia@hab.de> Date: Tue, 2 Feb 2021 13:39:47 +0100 Subject: [PATCH] =?UTF-8?q?Erg=C3=A4nzung=20zum=20Aufsplitten=20von=20vers?= =?UTF-8?q?chachtelten=20Tooltips?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- transkription.xsl | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/transkription.xsl b/transkription.xsl index 2e32bc7..0f37221 100644 --- a/transkription.xsl +++ b/transkription.xsl @@ -777,7 +777,7 @@ <xsl:sequence select="replace(., '\s$', '')"/> </xsl:template> - <!-- ************************************** step 4 (Aufsplitten von geschachtelten <a>-Tags): ********************************************* --> + <!-- ************************************** step 4 (Aufsplitten von geschachtelten Links/Tooltips): ********************************************* --> <xsl:template match="@*|node()" mode="step4"> <xsl:copy> @@ -794,4 +794,27 @@ </a> </xsl:template> + <xsl:template match="xhtml:span[@class='tooltip'][descendant::xhtml:span[@class='tooltip']]" mode="step4"> + <xsl:apply-templates mode="step4"/> + </xsl:template> + <xsl:template match="xhtml:span[@class='tooltip'][descendant::xhtml:span[@class='tooltip']]/xhtml:span[@class='custom help']" mode="step4"/> + <xsl:template match="xhtml:span[@class='tooltip'][descendant::xhtml:span[@class='tooltip']]/text()[matches(.,'\S')]" mode="step4"> + <span xmlns="http://www.w3.org/1999/xhtml" class="tooltip"> + <xsl:value-of select="."/> + <xsl:copy-of select="../xhtml:span[@class='custom help']"/> + </span> + </xsl:template> + <xsl:template match="xhtml:span[@class='tooltip'][descendant::xhtml:span[@class='tooltip']]/xhtml:span[@class ne 'custom help'][@class ne 'tooltip']/text()[matches(.,'\S')]" mode="step4"> <!-- z.B. <span class="latinletters"> --> + <span xmlns="http://www.w3.org/1999/xhtml" class="tooltip"> + <xsl:value-of select="."/> + <xsl:copy-of select="../../xhtml:span[@class='custom help']"/> + </span> + </xsl:template> + <xsl:template match="xhtml:span[@class='tooltip'][descendant::xhtml:span[@class='tooltip']]/xhtml:span[@class ne 'custom help'][@class ne 'tooltip']/xhtml:span[@class ne 'custom help'][@class ne 'tooltip']/text()[matches(.,'\S')]" mode="step4"> <!-- z.B. <span class="latinletters">A<span class="expansion">nn</span>o</span> --> + <span xmlns="http://www.w3.org/1999/xhtml" class="tooltip"> + <xsl:value-of select="."/> + <xsl:copy-of select="../../../xhtml:span[@class='custom help']"/> + </span> + </xsl:template> + </xsl:stylesheet> \ No newline at end of file -- GitLab