diff options
-rw-r--r-- | xslt/idp-summary.xslt | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/xslt/idp-summary.xslt b/xslt/idp-summary.xslt index 7e56f168..bbb88a2a 100644 --- a/xslt/idp-summary.xslt +++ b/xslt/idp-summary.xslt @@ -54,11 +54,15 @@ </xsl:template> <xsl:template match="md:EmailAddress"> - <xsl:value-of select="text()"/> + <xsl:value-of select="text()"/><xsl:text> \\</xsl:text> </xsl:template> <xsl:template match="md:OrganizationDisplayName"> - <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="md:OrganizationURL"> @@ -69,8 +73,27 @@ <xsl:value-of select="text()"/><xsl:text> </xsl:text> </xsl:template> - <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> |