diff options
Diffstat (limited to 'xslt')
-rw-r--r-- | xslt/sp-summary.xslt | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/xslt/sp-summary.xslt b/xslt/sp-summary.xslt index c0360ad8..7708cf19 100644 --- a/xslt/sp-summary.xslt +++ b/xslt/sp-summary.xslt @@ -53,7 +53,11 @@ </xsl:template> <xsl:template match="md:ServiceName"> - <xsl:value-of select="text()"/> + <xsl:call-template name="string-replace-all"> + <xsl:with-param name="text" select="text()" /> + <xsl:with-param name="replace" select="'|'" /> + <xsl:with-param name="by" select="'\|'" /> + </xsl:call-template> </xsl:template> <xsl:template match="samla:AttributeValue"> @@ -93,4 +97,24 @@ <xsl:template match="*"/> <xsl:template match="text()"/> + <xsl:template name="string-replace-all"> + <xsl:param name="text" /> + <xsl:param name="replace" /> + <xsl:param name="by" /> + <xsl:choose> + <xsl:when test="contains($text, $replace)"> + <xsl:value-of select="substring-before($text,$replace)" /> + <xsl:value-of select="$by" /> + <xsl:call-template name="string-replace-all"> + <xsl:with-param name="text" select="substring-after($text,$replace)" /> + <xsl:with-param name="replace" select="$replace" /> + <xsl:with-param name="by" select="$by" /> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$text" /> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + </xsl:stylesheet> |