|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<xsl:stylesheet version="1.0"
|
|
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
|
|
<xml:output method="text" indent="yes"/>
|
|
|
|
|
|
|
|
<xsl:template name="ucase">
|
|
|
|
<xsl:param name="s1"/>
|
|
|
|
<xsl:value-of select="translate($s1,'abcdefghijklmnopqrstuvwxyz ','ABCDEFGHIJKLMNOPQRSTUVWXYZ_')" />
|
|
|
|
</xsl:template>
|
|
|
|
<xsl:template name="lcase">
|
|
|
|
<xsl:param name="s1"/>
|
|
|
|
<xsl:value-of select="translate($s1,'ABCDEFGHIJKLMNOPQRSTUVWXYZ ','abcdefghijklmnopqrstuvwxyz_')" />
|
|
|
|
</xsl:template>
|
|
|
|
<!-- start umlaut_url-->
|
|
|
|
<xsl:template name="umlaut_urlencode">
|
|
|
|
<xsl:param name="s1"/>
|
|
|
|
<xsl:variable name="r1" >
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s1" /> <!--ä ist an position 23-->
|
|
|
|
<xsl:with-param name="search" select="'%'" />
|
|
|
|
<xsl:with-param name="replace" select="'%25'" />
|
|
|
|
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r2" >
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r1" />
|
|
|
|
<xsl:with-param name="search" select="'ö'" />
|
|
|
|
<xsl:with-param name="replace" select="'%F6'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r3" >
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r2" />
|
|
|
|
<xsl:with-param name="search" select="'ü'" />
|
|
|
|
<xsl:with-param name="replace" select="'%FC'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r4" >
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r3" />
|
|
|
|
<xsl:with-param name="search" select="'Ä'" />
|
|
|
|
<xsl:with-param name="replace" select="'%C4'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r5" >
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r4" />
|
|
|
|
<xsl:with-param name="search" select="'Ö'" />
|
|
|
|
<xsl:with-param name="replace" select="'%D6'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r6" >
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r5" />
|
|
|
|
<xsl:with-param name="search" select="'Ü'" />
|
|
|
|
<xsl:with-param name="replace" select="'%DC'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<xsl:variable name="r7" >
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r6" />
|
|
|
|
<xsl:with-param name="search" select="'='" />
|
|
|
|
<xsl:with-param name="replace" select="'%3D'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r8">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r7" />
|
|
|
|
<xsl:with-param name="search" select="'ß'" />
|
|
|
|
<xsl:with-param name="replace" select="'%DF'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r9">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r8" />
|
|
|
|
<xsl:with-param name="search" select="'$'" />
|
|
|
|
<xsl:with-param name="replace" select="'%24'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="amp"><![CDATA[&]]></xsl:variable>
|
|
|
|
<xsl:variable name="r10">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r9" />
|
|
|
|
<xsl:with-param name="search" select="$amp" />
|
|
|
|
<xsl:with-param name="replace" select="'%26'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r11">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r10" />
|
|
|
|
<xsl:with-param name="search" select="'+'" />
|
|
|
|
<xsl:with-param name="replace" select="'%2B'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r12">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r11" />
|
|
|
|
<xsl:with-param name="search" select="','" />
|
|
|
|
<xsl:with-param name="replace" select="'%2C'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r13">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r12" />
|
|
|
|
<xsl:with-param name="search" select="'/'" />
|
|
|
|
<xsl:with-param name="replace" select="'%2F'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r14">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r13" />
|
|
|
|
<xsl:with-param name="search" select="':'" />
|
|
|
|
<xsl:with-param name="replace" select="'%3A'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r15">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r14" />
|
|
|
|
<xsl:with-param name="search" select="';'" />
|
|
|
|
<xsl:with-param name="replace" select="'%3B'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r16">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r15" />
|
|
|
|
<xsl:with-param name="search" select="'='" />
|
|
|
|
<xsl:with-param name="replace" select="'%3D'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r17">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r16" />
|
|
|
|
<xsl:with-param name="search" select="'?'" />
|
|
|
|
<xsl:with-param name="replace" select="'%3F'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r18">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r17" />
|
|
|
|
<xsl:with-param name="search" select="'@'" />
|
|
|
|
<xsl:with-param name="replace" select="'%40'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="quot">"</xsl:variable>
|
|
|
|
<xsl:variable name="r19">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r18" />
|
|
|
|
<xsl:with-param name="search" select="$quot" />
|
|
|
|
<xsl:with-param name="replace" select="'%22'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="lt"><![CDATA[<]]></xsl:variable>
|
|
|
|
<xsl:variable name="r20">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r19" />
|
|
|
|
<xsl:with-param name="search" select="$lt" />
|
|
|
|
<xsl:with-param name="replace" select="'%3C'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="gt"><![CDATA[>]]></xsl:variable>
|
|
|
|
<xsl:variable name="r21">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r20" />
|
|
|
|
<xsl:with-param name="search" select="$gt" />
|
|
|
|
<xsl:with-param name="replace" select="'%3E'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r22">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r21" />
|
|
|
|
<xsl:with-param name="search" select="'#'" />
|
|
|
|
<xsl:with-param name="replace" select="'%23'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r23">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r22" />
|
|
|
|
<xsl:with-param name="search" select="'ä'" />
|
|
|
|
<xsl:with-param name="replace" select="'%E4'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r24">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r23" />
|
|
|
|
<xsl:with-param name="search" select="'{'" />
|
|
|
|
<xsl:with-param name="replace" select="'%7B'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r25">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r24" />
|
|
|
|
<xsl:with-param name="search" select="'}'" />
|
|
|
|
<xsl:with-param name="replace" select="'%7D'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r26">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r25" />
|
|
|
|
<xsl:with-param name="search" select="'|'" />
|
|
|
|
<xsl:with-param name="replace" select="'%7C'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r27">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r26" />
|
|
|
|
<xsl:with-param name="search" select="'\'" />
|
|
|
|
<xsl:with-param name="replace" select="'%5C'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r28">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r27" />
|
|
|
|
<xsl:with-param name="search" select="'^'" />
|
|
|
|
<xsl:with-param name="replace" select="'%5E'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r29">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r28" />
|
|
|
|
<xsl:with-param name="search" select="'~'" />
|
|
|
|
<xsl:with-param name="replace" select="'%7E'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r30">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r29" />
|
|
|
|
<xsl:with-param name="search" select="'['" />
|
|
|
|
<xsl:with-param name="replace" select="'%5B'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r31">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r30" />
|
|
|
|
<xsl:with-param name="search" select="']'" />
|
|
|
|
<xsl:with-param name="replace" select="'%5D'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r31" />
|
|
|
|
<xsl:with-param name="search" select="' '" />
|
|
|
|
<xsl:with-param name="replace" select="'%20'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
|
|
|
|
|
|
|
|
</xsl:template>
|
|
|
|
<!-- end umlaut-->
|
|
|
|
<!-- start ohne umlaut -->
|
|
|
|
<xsl:template name="ohne_umlaut">
|
|
|
|
<xsl:param name="s1"/>
|
|
|
|
<xsl:variable name="r1" >
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s1" />
|
|
|
|
<xsl:with-param name="search" select="'ä'" />
|
|
|
|
<xsl:with-param name="replace" select="'ae'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r2" >
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r1" />
|
|
|
|
<xsl:with-param name="search" select="'ö'" />
|
|
|
|
<xsl:with-param name="replace" select="'oe'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r3" >
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r2" />
|
|
|
|
<xsl:with-param name="search" select="'ü'" />
|
|
|
|
<xsl:with-param name="replace" select="'ue'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r4" >
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r3" />
|
|
|
|
<xsl:with-param name="search" select="'Ä'" />
|
|
|
|
<xsl:with-param name="replace" select="'Ae'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r5" >
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r4" />
|
|
|
|
<xsl:with-param name="search" select="'Ö'" />
|
|
|
|
<xsl:with-param name="replace" select="'Oe'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r6" >
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r5" />
|
|
|
|
<xsl:with-param name="search" select="'Ü'" />
|
|
|
|
<xsl:with-param name="replace" select="'Ue'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r6" />
|
|
|
|
<xsl:with-param name="search" select="'ß'" />
|
|
|
|
<xsl:with-param name="replace" select="'ss'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template name="lcase_ohne_umlaut">
|
|
|
|
<xsl:param name="zs"/>
|
|
|
|
<xsl:variable name="r10" >
|
|
|
|
<xsl:call-template name="ohne_umlaut">
|
|
|
|
<xsl:with-param name="s1" select="$zs" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:call-template name="lcase">
|
|
|
|
<xsl:with-param name="s1" select="$r10" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:template>
|
|
|
|
<xsl:template name="ucase_ohne_umlaut">
|
|
|
|
<xsl:param name="zs"/>
|
|
|
|
<xsl:variable name="r10" >
|
|
|
|
<xsl:call-template name="ohne_umlaut">
|
|
|
|
<xsl:with-param name="s1" select="$zs" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:call-template name="ucase">
|
|
|
|
<xsl:with-param name="s1" select="$r10" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:template>
|
|
|
|
<xsl:template name="lcaseOhneUmlaut_alt">
|
|
|
|
<xsl:param name="s1"/>
|
|
|
|
<xsl:value-of select="translate($s1,'ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜßäöü ','abcdefghijklmnopqrstuvwxyzaousaou_')" />
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template name="search_replace">
|
|
|
|
<xsl:param name="string" />
|
|
|
|
<xsl:param name="search" />
|
|
|
|
<xsl:param name="replace" />
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="not($string)" />
|
|
|
|
<xsl:when test="contains($string, $search)">
|
|
|
|
<xsl:value-of select="substring-before($string, $search)" />
|
|
|
|
<xsl:value-of select="$replace" />
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string"
|
|
|
|
select="substring-after($string, $search)" />
|
|
|
|
<xsl:with-param name="search"
|
|
|
|
select="$search" />
|
|
|
|
<xsl:with-param name="replace"
|
|
|
|
select="$replace" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:value-of select="$string" />
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:template>
|
|
|
|
<!-- end -->
|
|
|
|
<!-- start newline br 11.3.09 MB-->
|
|
|
|
<xsl:template name="newline_to_br">
|
|
|
|
<xsl:param name="string"/>
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="contains($string,' ')">
|
|
|
|
<xsl:value-of select="substring-before($string,' ')"/>
|
|
|
|
<br/>
|
|
|
|
<xsl:call-template name="newline_to_br">
|
|
|
|
<xsl:with-param name="string" select="substring-after($string,' ')"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:value-of select="$string"/>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:template>
|
|
|
|
<!-- end newline br-->
|
|
|
|
<!-- start bw newline-->
|
|
|
|
<xsl:template name="br_to_newline">
|
|
|
|
<!-- ersetzt in einem String alle br-Tags durch unescaped br tags
|
|
|
|
alle Varianten werden geprüft, also unabhängig von Gross- oder Kleinschreinung oder Leerzeichen
|
|
|
|
-->
|
|
|
|
<xsl:param name="string" />
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="not($string)" />
|
|
|
|
<xsl:when test="contains($string, '<br>')">
|
|
|
|
<xsl:value-of select="substring-before($string, '<br>')" />
|
|
|
|
<br />
|
|
|
|
<xsl:call-template name="br_to_newline">
|
|
|
|
<xsl:with-param name="string"
|
|
|
|
select="substring-after($string, '<br>')" />
|
|
|
|
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:when test="contains($string, '<br >')">
|
|
|
|
<xsl:value-of select="substring-before($string, '<br >')" />
|
|
|
|
<br />
|
|
|
|
<xsl:call-template name="br_to_newline">
|
|
|
|
<xsl:with-param name="string"
|
|
|
|
select="substring-after($string, '<br >')" />
|
|
|
|
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:when test="contains($string, '<BR>')">
|
|
|
|
<xsl:value-of select="substring-before($string, '<BR>')" />
|
|
|
|
<br />
|
|
|
|
<xsl:call-template name="br_to_newline">
|
|
|
|
<xsl:with-param name="string"
|
|
|
|
select="substring-after($string, '<BR>')" />
|
|
|
|
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:when test="contains($string, '<BR >')">
|
|
|
|
<xsl:value-of select="substring-before($string, '<BR >')" />
|
|
|
|
<br />
|
|
|
|
<xsl:call-template name="br_to_newline">
|
|
|
|
<xsl:with-param name="string"
|
|
|
|
select="substring-after($string, '<BR >')" />
|
|
|
|
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:value-of select="$string" />
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:template>
|
|
|
|
<!-- end -->
|
|
|
|
<!-- start json adapt-->
|
|
|
|
<xsl:template name="json_adapt">
|
|
|
|
<xsl:param name="string" />
|
|
|
|
<xsl:variable name="s2">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="normalize-space($string)" />
|
|
|
|
<xsl:with-param name="search" select="'\\'" />
|
|
|
|
<xsl:with-param name="replace" select="'\\\\'"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="s3">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s2" />
|
|
|
|
<xsl:with-param name="search" select="'ä'" />
|
|
|
|
<xsl:with-param name="replace" select="'\\344'"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="s4">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s3" />
|
|
|
|
<xsl:with-param name="search" select="'Ä'" />
|
|
|
|
<xsl:with-param name="replace" select="'\\304'"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="s5">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s4" />
|
|
|
|
<xsl:with-param name="search" select="'ö'" />
|
|
|
|
<xsl:with-param name="replace" select="'\\366'"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="s6">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s5" />
|
|
|
|
<xsl:with-param name="search" select="'Ö'" />
|
|
|
|
<xsl:with-param name="replace" select="'\\326'"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="s7">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s6" />
|
|
|
|
<xsl:with-param name="search" select="'ü'" />
|
|
|
|
<xsl:with-param name="replace" select="'\\374'"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="s8">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s7" />
|
|
|
|
<xsl:with-param name="search" select="'Ü'" />
|
|
|
|
<xsl:with-param name="replace" select="'\\334'"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="s9">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s8" />
|
|
|
|
<xsl:with-param name="search" select="'ß'" />
|
|
|
|
<xsl:with-param name="replace" select="'\\337'"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="quot">"</xsl:variable>
|
|
|
|
<xsl:variable name="s10">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s9" />
|
|
|
|
<xsl:with-param name="search" select="$quot" />
|
|
|
|
<xsl:with-param name="replace" select="'\\\'"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="s11">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s10" />
|
|
|
|
<xsl:with-param name="search" select="'\b'" />
|
|
|
|
<xsl:with-param name="replace" select="'\\b'"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="s12">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s11" />
|
|
|
|
<xsl:with-param name="search" select="'\f'" />
|
|
|
|
<xsl:with-param name="replace" select="'\\f'"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="s13">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s12" />
|
|
|
|
<xsl:with-param name="search" select="'\n'" />
|
|
|
|
<xsl:with-param name="replace" select="'\\n'"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="s14">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s13" />
|
|
|
|
<xsl:with-param name="search" select="'\r'" />
|
|
|
|
<xsl:with-param name="replace" select="'\\r'"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="s15">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s14" />
|
|
|
|
<xsl:with-param name="search" select="'\t'" />
|
|
|
|
<xsl:with-param name="replace" select="'\\t'"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="p"><![CDATA[<p>]]></xsl:variable>
|
|
|
|
<xsl:variable name="s17">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s15" />
|
|
|
|
<xsl:with-param name="search" select="$p" />
|
|
|
|
<xsl:with-param name="replace" select="' '"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="p2"><![CDATA[</p>]]></xsl:variable>
|
|
|
|
<xsl:variable name="s18">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s17" />
|
|
|
|
<xsl:with-param name="search" select="$p2" />
|
|
|
|
<xsl:with-param name="replace" select="''"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="p3"><![CDATA[<p class='smallBreak'>]]></xsl:variable>
|
|
|
|
<xsl:variable name="s19">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s18" />
|
|
|
|
<xsl:with-param name="search" select="$p3" />
|
|
|
|
<xsl:with-param name="replace" select="' '"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="br"><![CDATA[<br>]]></xsl:variable>
|
|
|
|
<xsl:variable name="s20">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s19" />
|
|
|
|
<xsl:with-param name="search" select="$br" />
|
|
|
|
<xsl:with-param name="replace" select="' '"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="b"><![CDATA[<b>]]></xsl:variable>
|
|
|
|
<xsl:variable name="s21">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s20" />
|
|
|
|
<xsl:with-param name="search" select="$b" />
|
|
|
|
<xsl:with-param name="replace" select="''"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="b2"><![CDATA[</b>]]></xsl:variable>
|
|
|
|
<xsl:variable name="s22">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s21" />
|
|
|
|
<xsl:with-param name="search" select="$b2" />
|
|
|
|
<xsl:with-param name="replace" select="''"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="i"><![CDATA[<i>]]></xsl:variable>
|
|
|
|
<xsl:variable name="s23">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s22" />
|
|
|
|
<xsl:with-param name="search" select="$i" />
|
|
|
|
<xsl:with-param name="replace" select="''"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="i2"><![CDATA[</i>]]></xsl:variable>
|
|
|
|
<xsl:variable name="s24">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s23" />
|
|
|
|
<xsl:with-param name="search" select="$i2" />
|
|
|
|
<xsl:with-param name="replace" select="''"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="s25">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s24" />
|
|
|
|
<xsl:with-param name="search" select="'/'" />
|
|
|
|
<xsl:with-param name="replace" select="'\\/'"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="s26">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s25" />
|
|
|
|
<xsl:with-param name="search" select="'\000'" />
|
|
|
|
<xsl:with-param name="replace" select="' '"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<!--
|
|
|
|
<xsl:variable name="s27">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s26" />
|
|
|
|
<xsl:with-param name="search" select="' '" />
|
|
|
|
<xsl:with-param name="replace" select="''"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
-->
|
|
|
|
<xsl:value-of select="$s26"/>
|
|
|
|
|
|
|
|
</xsl:template>
|
|
|
|
<!-- end json adapt-->
|
|
|
|
<!-- start create_varname ACHTUNG: muss Javascript-funktion in sx_function.js entsprechen!-->
|
|
|
|
<xsl:template name="create_varname">
|
|
|
|
<xsl:param name="string"/>
|
|
|
|
|
|
|
|
<!--<xsl:variable name="s2">
|
|
|
|
<xsl:call-template name="ohne_umlaut">
|
|
|
|
<xsl:with-param name="string" select="$s1"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>-->
|
|
|
|
|
|
|
|
<xsl:variable name="r1" >
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$string" />
|
|
|
|
<xsl:with-param name="search" select="'ä'" />
|
|
|
|
<xsl:with-param name="replace" select="'ae'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r2" >
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r1" />
|
|
|
|
<xsl:with-param name="search" select="'ö'" />
|
|
|
|
<xsl:with-param name="replace" select="'oe'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r3" >
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r2" />
|
|
|
|
<xsl:with-param name="search" select="'ü'" />
|
|
|
|
<xsl:with-param name="replace" select="'ue'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r4" >
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r3" />
|
|
|
|
<xsl:with-param name="search" select="'Ä'" />
|
|
|
|
<xsl:with-param name="replace" select="'Ae'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r5" >
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r4" />
|
|
|
|
<xsl:with-param name="search" select="'Ö'" />
|
|
|
|
<xsl:with-param name="replace" select="'Oe'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r6" >
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r5" />
|
|
|
|
<xsl:with-param name="search" select="'Ü'" />
|
|
|
|
<xsl:with-param name="replace" select="'Ue'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="r7">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r6" />
|
|
|
|
<xsl:with-param name="search" select="'ß'" />
|
|
|
|
<xsl:with-param name="replace" select="'ss'" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<xsl:variable name="s3">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$r7" />
|
|
|
|
<xsl:with-param name="search" select="' '" />
|
|
|
|
<xsl:with-param name="replace" select="'_'"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<xsl:variable name="s4">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s3" />
|
|
|
|
<xsl:with-param name="search" select="','" />
|
|
|
|
<xsl:with-param name="replace" select="''"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<xsl:variable name="s5">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s4" />
|
|
|
|
<xsl:with-param name="search" select="'?'" />
|
|
|
|
<xsl:with-param name="replace" select="''"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<xsl:variable name="s6">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s5" />
|
|
|
|
<xsl:with-param name="search" select="'!'" />
|
|
|
|
<xsl:with-param name="replace" select="''"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<xsl:variable name="s7">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s6" />
|
|
|
|
<xsl:with-param name="search" select="'^'" />
|
|
|
|
<xsl:with-param name="replace" select="''"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<xsl:variable name="s8">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s7" />
|
|
|
|
<xsl:with-param name="search" select="'%'" />
|
|
|
|
<xsl:with-param name="replace" select="''"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<xsl:variable name="s9">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s8" />
|
|
|
|
<xsl:with-param name="search" select="'§'" />
|
|
|
|
<xsl:with-param name="replace" select="''"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<xsl:variable name="s10">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s9" />
|
|
|
|
<xsl:with-param name="search" select="'/'" />
|
|
|
|
<xsl:with-param name="replace" select="''"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<xsl:variable name="s11">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s10" />
|
|
|
|
<xsl:with-param name="search" select="'*'" />
|
|
|
|
<xsl:with-param name="replace" select="''"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<xsl:variable name="s12">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s11" />
|
|
|
|
<xsl:with-param name="search" select="'#'" />
|
|
|
|
<xsl:with-param name="replace" select="''"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<xsl:variable name="s13">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s12" />
|
|
|
|
<xsl:with-param name="search" select="'|'" />
|
|
|
|
<xsl:with-param name="replace" select="''"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<xsl:variable name="s14">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s13" />
|
|
|
|
<xsl:with-param name="search" select="'$'" />
|
|
|
|
<xsl:with-param name="replace" select="''"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<xsl:variable name="s15">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s14" />
|
|
|
|
<xsl:with-param name="search" select="'('" />
|
|
|
|
<xsl:with-param name="replace" select="''"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="s16">
|
|
|
|
<xsl:call-template name="search_replace">
|
|
|
|
<xsl:with-param name="string" select="$s15" />
|
|
|
|
<xsl:with-param name="search" select="')'" />
|
|
|
|
<xsl:with-param name="replace" select="''"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<xsl:value-of select="$s16"/>
|
|
|
|
|
|
|
|
</xsl:template>
|
|
|
|
<!-- end varname-->
|
|
|
|
<!-- start " -> ' -->
|
|
|
|
<xsl:template name="remove_linebreaksAndQuot">
|
|
|
|
<xsl:param name="volltext" />
|
|
|
|
<xsl:variable name="quot">"</xsl:variable>
|
|
|
|
<xsl:variable name="apos">'</xsl:variable>
|
|
|
|
<xsl:variable name="r1" >
|
|
|
|
<xsl:value-of select="translate($volltext, $quot, $apos)" />
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:call-template name="remove_linebreaks">
|
|
|
|
<xsl:with-param name="volltext" select="$r1" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template name="remove_linebreaks">
|
|
|
|
<xsl:param name="volltext" />
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="contains($volltext,'\ ')">
|
|
|
|
<xsl:value-of select="substring-before($volltext,'\ ')"/>
|
|
|
|
<!--<br />--><xsl:text> </xsl:text>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:when test="contains($volltext,' ')">
|
|
|
|
<xsl:value-of select="substring-before($volltext,' ')"/>
|
|
|
|
<!--<br />--><xsl:text> </xsl:text>
|
|
|
|
<xsl:call-template name="remove_linebreaks">
|
|
|
|
<xsl:with-param name="volltext"><xsl:value-of select="substring-after($volltext,' ')" />
|
|
|
|
</xsl:with-param>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:copy-of select="$volltext" />
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
|
|
|
|
</xsl:template>
|
|
|
|
<!-- end -->
|
|
|
|
|
|
|
|
<!-- start indent with nbsp-->
|
|
|
|
<xsl:template name="indent">
|
|
|
|
<xsl:param name="i" />
|
|
|
|
<xsl:param name="count" />
|
|
|
|
|
|
|
|
<xsl:if test="$i <= $count">
|
|
|
|
 
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="$i <= $count">
|
|
|
|
<xsl:call-template name="indent">
|
|
|
|
<xsl:with-param name="i">
|
|
|
|
<xsl:value-of select="$i + 1"/>
|
|
|
|
</xsl:with-param>
|
|
|
|
<xsl:with-param name="count">
|
|
|
|
<xsl:value-of select="$count"/>
|
|
|
|
</xsl:with-param>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:if>
|
|
|
|
</xsl:template>
|
|
|
|
<!-- jsAssign entfernt willkürliche Zeilenumbrüche in XSLT-Transformationen
|
|
|
|
https://stackoverflow.com/questions/43313204/avoiding-line-breaks-with-saxon-xslt-processor
|
|
|
|
damit javascript assignments klappen
|
|
|
|
Beispiel:
|
|
|
|
<xsl:call-template name="jsAssign">
|
|
|
|
<xsl:with-param name="varname" select="'maskenname'" />
|
|
|
|
<xsl:with-param name="value" select="$langer_string"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
erzeugt:
|
|
|
|
maskenname='';
|
|
|
|
maskenname+='...teil1 bis 40 Zeichen';
|
|
|
|
maskenname+='...teil2 Zeichen 41 -80 ';
|
|
|
|
usw.
|
|
|
|
|
|
|
|
-->
|
|
|
|
<xsl:template name="jsAssign">
|
|
|
|
<xsl:param name="varname" />
|
|
|
|
<xsl:param name="value" />
|
|
|
|
<xsl:choose><xsl:when test="string-length($value) >40">
|
|
|
|
<xsl:text>
|
|
|
|
</xsl:text><xsl:value-of select="$varname"/><xsl:text>='';
|
|
|
|
</xsl:text><xsl:call-template name="jsAssignHelper">
|
|
|
|
<xsl:with-param name="varname" select="$varname" />
|
|
|
|
<xsl:with-param name="value" select="$value" />
|
|
|
|
</xsl:call-template>
|
|
|
|
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:text>
|
|
|
|
</xsl:text><xsl:value-of select="$varname"/><xsl:text>='</xsl:text>
|
|
|
|
<xsl:value-of select="$value" /><xsl:text>';
|
|
|
|
</xsl:text>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
|
|
|
|
</xsl:template>
|
|
|
|
<!-- jsAssignHelper gibt die ersten 40 Zeichen in einem JS-assign aus
|
|
|
|
wenn es weitere gibt werden die rekursiv dazugefügt.
|
|
|
|
-->
|
|
|
|
<xsl:template name="jsAssignHelper">
|
|
|
|
<xsl:param name="varname" />
|
|
|
|
<xsl:param name="value" />
|
|
|
|
<xsl:param name="offset" />
|
|
|
|
<xsl:choose><xsl:when test="string-length($value) >40">
|
|
|
|
<xsl:text>
|
|
|
|
</xsl:text><xsl:value-of select="$varname"/><xsl:text>+='</xsl:text>
|
|
|
|
<xsl:value-of select="substring($value,1,40)" /><xsl:text>';
|
|
|
|
</xsl:text>
|
|
|
|
<xsl:call-template name="jsAssignHelper">
|
|
|
|
<xsl:with-param name="varname" select="$varname" />
|
|
|
|
<xsl:with-param name="value" select="substring($value,41)" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:text>
|
|
|
|
</xsl:text><xsl:value-of select="$varname"/><xsl:text>+='</xsl:text>
|
|
|
|
<xsl:value-of select="$value" /><xsl:text>';
|
|
|
|
</xsl:text>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:template>
|
|
|
|
</xsl:stylesheet>
|