Skip to content
Snippets Groups Projects
Commit 16548072 authored by Martin de la Iglesia's avatar Martin de la Iglesia
Browse files

Ergänzung: Aufsplitten von geschachtelten <a>-Tags

parent 1cf5802d
No related branches found
No related tags found
No related merge requests found
...@@ -21,9 +21,12 @@ ...@@ -21,9 +21,12 @@
<xsl:sequence select="$step2"/> <xsl:sequence select="$step2"/>
</xsl:variable> </xsl:variable>
<xsl:variable name="outputpath" select="concat(replace(replace(replace(replace(lower-case(translate(//title, '/ ', '')), 'ä', 'ae'), 'ö', 'oe'), 'ü', 'ue'), '–', '_'),'.xhtml')"/> <xsl:variable name="outputpath" select="concat(replace(replace(replace(replace(lower-case(translate(//title, '/ ', '')), 'ä', 'ae'), 'ö', 'oe'), 'ü', 'ue'), '–', '_'),'.xhtml')"/>
<xsl:result-document href="../HTML-Dateien/{$outputpath}"> <xsl:variable name="output_step3">
<xsl:apply-templates mode="step3" select="$output"/> <xsl:apply-templates mode="step3" select="$output"/>
</xsl:result-document> </xsl:variable>
<xsl:result-document href="../HTML-Dateien/{$outputpath}">
<xsl:apply-templates mode="step4" select="$output_step3"/>
</xsl:result-document>
</xsl:template> </xsl:template>
<xsl:template match="@*|node()" mode="step1"> <xsl:template match="@*|node()" mode="step1">
...@@ -127,7 +130,7 @@ ...@@ -127,7 +130,7 @@
<!-- ************************************** step3: ********************************************* --> <!-- ************************************** step 3: ********************************************* -->
<!-- Hier die Dateipfade angeben: --> <!-- Hier die Dateipfade angeben: -->
<xsl:variable name="psnpath">psn/</xsl:variable> <xsl:variable name="psnpath">psn/</xsl:variable>
...@@ -774,4 +777,21 @@ ...@@ -774,4 +777,21 @@
<xsl:sequence select="replace(., '\s$', '')"/> <xsl:sequence select="replace(., '\s$', '')"/>
</xsl:template> </xsl:template>
<!-- ************************************** step 4 (Aufsplitten von geschachtelten <a>-Tags): ********************************************* -->
<xsl:template match="@*|node()" mode="step4">
<xsl:copy>
<xsl:apply-templates select="@*|node()" mode="step4"/>
</xsl:copy>
</xsl:template>
<xsl:template match="xhtml:a[descendant::xhtml:a]" mode="step4">
<xsl:apply-templates mode="step4"/>
</xsl:template>
<xsl:template match="xhtml:a[descendant::xhtml:a]/text()[matches(.,'\S')]" mode="step4">
<a xmlns="http://www.w3.org/1999/xhtml">
<xsl:attribute name="href" select="../@href"/>
<xsl:value-of select="."/>
</a>
</xsl:template>
</xsl:stylesheet> </xsl:stylesheet>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment