diff --git a/transkription.xsl b/transkription.xsl index 2e32bc7a422a9b199a11252716973cec9bd609b0..0f37221666c2288a67fcc238622c3500487e5c12 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