- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE xsl:stylesheet [
- <!ENTITY nbsp " ">
- <!ENTITY br " ">
- <!ENTITY dot "•">
- <!ENTITY raquote "»">
- <!ENTITY lsbracket "[">
- <!ENTITY Auml "Ä">
- <!ENTITY Ouml "Ö">
- <!ENTITY Uuml "Ü">
- <!ENTITY auml "ä">
- <!ENTITY ouml "ö">
- <!ENTITY uuml "ü">
- ]>
-
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="text" encoding="ISO-8859-1"/>
-
- <xsl:template match="ihknewsletter">
- <xsl:call-template name="targets"/>
- <xsl:call-template name="browserlink"/>
- <xsl:call-template name="salutation"/>
-
- <xsl:for-each select="news">
- <xsl:call-template name="news"/>
- </xsl:for-each>
-
- <xsl:apply-templates select="imprint"/>
- <xsl:apply-templates select="footer"/>
- </xsl:template>
-
- <xsl:template name="targets">
- <xsl:text>[%if </xsl:text>
- <xsl:for-each select="news">
- <xsl:if test="position()!=1">
- <xsl:text> AND </xsl:text>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="target">
- <xsl:for-each select="target">
- <xsl:if test="position()!=1">
- <xsl:text> AND </xsl:text>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="string-length(.)>0">
- <xsl:text>BelongsNotToGroup("</xsl:text><xsl:value-of disable-output-escaping="yes" select="."/><xsl:text>")</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text> FALSE </xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text> FALSE </xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- <xsl:text>] [%no-mail] </xsl:text>
- <xsl:text> [%endif] </xsl:text>
- </xsl:template>
-
- <xsl:template name="browserlink">
- <xsl:text>Möchten Sie diesen Newsletter mit Bildern betrachten? Zur Webseitenansicht&br;</xsl:text>
- <xsl:text>[%application-url]/html_mail.jsp?params=[%online_params]&br;</xsl:text>
- </xsl:template>
-
-
- <xsl:template name="salutation">
- <xsl:text>[%hr(=)]&br;</xsl:text>
- <xsl:value-of select="salutation/address"/>
- <xsl:text>&br;&br;</xsl:text>
- <xsl:for-each select="salutation/paragraph">
- <xsl:choose>
- <xsl:when test="position()=last()">
- <xsl:value-of select="."/>
- <xsl:text>&br;</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="."/>
- <xsl:text>&br;&br;</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- <xsl:text>&br;</xsl:text>
- <xsl:value-of select="salutation/greeting"/>
- <xsl:text>&br;</xsl:text>
- <xsl:value-of select="salutation/sig_name"/>
- <xsl:text>&br;&br;</xsl:text>
- <xsl:text>Abonnement ändern? </xsl:text>
- <xsl:text>[%application-url]/benutzerprofil.jsp?email=[email]&id=[%id]</xsl:text>
- <xsl:text>&br;&br;</xsl:text>
- </xsl:template>
-
-
- <xsl:template name="news">
- <xsl:if test="target">
- <xsl:call-template name="start_target"/>
- </xsl:if>
- <xsl:variable name="feld">
- <xsl:choose>
- <xsl:when test="string-length(//ihknewsletter/all_gesch_feld/gesch_feld) > 0">
- <xsl:value-of select="//ihknewsletter/all_gesch_feld/gesch_feld"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="news_gesch_feld"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="underline_len">
- <xsl:if test="string-length(title) >= 75">75</xsl:if>
- <xsl:if test="string-length(title) < 75"><xsl:value-of select="string-length(title)"/></xsl:if>
- </xsl:variable>
- <xsl:text>&br;&br;</xsl:text>
- <xsl:if test="title_show = 'ja'">
- <xsl:if test="string-length($feld) > 0">
- <xsl:text>&br;</xsl:text>
- <xsl:value-of select="$feld"/>
- <xsl:text>[%hr(=)] &br;</xsl:text>
- </xsl:if>
- </xsl:if>
- <xsl:value-of select="title"/>
- <xsl:text>&br;</xsl:text>
- <xsl:call-template name="underline">
- <xsl:with-param name="count" select="$underline_len"/>
- </xsl:call-template>
- <xsl:text>&br;</xsl:text>
- <xsl:for-each select="paragraph">
- <xsl:choose>
- <xsl:when test="position()=last()">
- <xsl:if test="string-length(.) > 0">
- <xsl:value-of select="."/>
- <xsl:text>&br;</xsl:text>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="string-length(.) > 0">
- <xsl:value-of select="."/>
- <xsl:text>&br;&br;</xsl:text>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- <xsl:if test="link">
- <xsl:value-of disable-output-escaping="yes" select="link"/>
- <xsl:text>&br;</xsl:text>
- </xsl:if>
- <xsl:if test="target">
- <xsl:call-template name="end_target"/>
- </xsl:if>
- </xsl:template>
-
-
- <xsl:template match="imprint">
- <xsl:text>&br;[%hr(=)] &br;&br;</xsl:text>
- <xsl:text>Impressum&br;</xsl:text>
- <xsl:call-template name="underline">
- <xsl:with-param name="count" select="string-length('Impressum')"/>
- </xsl:call-template>
- <xsl:text>&br;</xsl:text>
- <xsl:value-of select="name"/>
- <xsl:text>&br;</xsl:text>
- <xsl:value-of select="street"/>
- <xsl:text>&br;</xsl:text>
- <xsl:value-of select="city"/>
- <xsl:text>&br;&br;</xsl:text>
- <xsl:text>Telefon: </xsl:text>
- <xsl:value-of select="phone"/>
- <xsl:text>&br;</xsl:text>
- <xsl:if test="fax">
- <xsl:text>Telefax: </xsl:text>
- <xsl:value-of select="fax"/>
- <xsl:text>&br;</xsl:text>
- </xsl:if>
- <xsl:if test="website">
- <xsl:text>Website: </xsl:text>
- <xsl:value-of select="website"/>
- <xsl:text>&br;</xsl:text>
- </xsl:if>
- <xsl:text>E-Mail: </xsl:text>
- <xsl:value-of select="email"/>
- <xsl:text>&br;&br;</xsl:text>
- <xsl:if test="ceo">
- <xsl:text>Geschäftsführer: </xsl:text>
- <xsl:value-of select="ceo"/>
- <xsl:text>&br;</xsl:text>
- </xsl:if>
- <xsl:if test="editorial_office">
- <xsl:text>Redaktion: </xsl:text>
- <xsl:value-of select="editorial_office"/>
- <xsl:text>&br;</xsl:text>
- </xsl:if>
- <xsl:if test="register">
- <xsl:text>Register: </xsl:text>
- <xsl:value-of select="register"/>
- <xsl:text>&br;</xsl:text>
- </xsl:if>
- <xsl:if test="tax">
- <xsl:text>Umsatzsteuer-ID: </xsl:text>
- <xsl:value-of select="tax"/>
- <xsl:text>&br;</xsl:text>
- </xsl:if>
- </xsl:template>
-
-
- <xsl:template match="footer">
- <xsl:text>&br;</xsl:text>
- <xsl:for-each select="paragraph">
- <xsl:value-of select="."/>
- <xsl:text>&br;&br;</xsl:text>
- </xsl:for-each>
- <xsl:text>Newsletter-Abonnement beenden? </xsl:text>
- <xsl:value-of disable-output-escaping="yes" select="unsubscribe"/>
- <xsl:text>&br;&br;</xsl:text>
- <xsl:if test="string-length(copyright)>0">
- <xsl:text/>
- <xsl:value-of select="copyright"/>
- <xsl:text>&br;[%hr(=)]</xsl:text>
- </xsl:if>
- </xsl:template>
-
-
- <xsl:template name="underline" xml:space="default">
- <xsl:param name="count"/>
- <xsl:if test="number($count) > 0">-<xsl:call-template name="underline">
- <xsl:with-param name="count" select="number($count) - 1"/>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
-
-
- <xsl:template name="start_target">
- <xsl:variable name="ending">
- <xsl:for-each select="target">
- <xsl:sort select="." data-type="text" order="descending" />
- <xsl:if test="position()=1">
- <xsl:if test="string-length(.) > 0">]
- </xsl:if>
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:for-each select="target">
- <xsl:sort select="." data-type="text" order="descending" />
- <xsl:if test="string-length(.) > 0">
- <xsl:if test="position() = 1">
- <xsl:text>
- [%if </xsl:text>
- </xsl:if>
- <xsl:if test="position() != 1">
- <xsl:text> OR </xsl:text>
- </xsl:if>
- <xsl:text>BelongsToGroup("</xsl:text><xsl:value-of disable-output-escaping="yes" select="."/><xsl:text>")</xsl:text>
- </xsl:if>
- <xsl:if test="position()=last()">
- <xsl:value-of select="$ending"/>
- </xsl:if>
- </xsl:for-each>
- </xsl:template>
-
-
- <xsl:template name="end_target">
- <xsl:for-each select="target">
- <xsl:sort select="." data-type="text" order="descending" />
- <xsl:if test="string-length(.) > 0">
- <xsl:if test="position() = 1">
- <xsl:text>
- [%endif]
- </xsl:text>
- </xsl:if>
- </xsl:if>
- </xsl:for-each>
- </xsl:template>
-
- </xsl:stylesheet>
|