This repository has been archived by the owner on Jan 9, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added filter to strip CRLFs from incoming messages
- Loading branch information
1 parent
7a73664
commit 8477155
Showing
1 changed file
with
30 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,34 @@ | ||
<?xml version="1.0"?> | ||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | ||
<xsl:output encoding="iso-8859-1" | ||
method="xml" | ||
omit-xml-declaration="yes" | ||
indent="no" /> | ||
<xsl:template match="/log"> | ||
<xsl:text>FILENAME COMMENT </xsl:text> | ||
<xsl:output encoding="iso-8859-1" | ||
method="xml" | ||
omit-xml-declaration="yes" | ||
indent="no" /> | ||
<xsl:template match="/log"> | ||
<xsl:for-each select="logentry"> | ||
<xsl:for-each select="paths/path"> | ||
<xsl:text>.</xsl:text><xsl:value-of select="."/> | ||
<xsl:text> </xsl:text> | ||
<xsl:value-of select="../../msg"/><xsl:text> </xsl:text> | ||
</xsl:for-each> | ||
</xsl:for-each> | ||
</xsl:template> | ||
<xsl:for-each select="paths/path"> | ||
<xsl:text>.</xsl:text> | ||
<!-- File path --> | ||
<xsl:value-of select="."/> | ||
<!-- Column separator --> | ||
<xsl:text> </xsl:text> | ||
|
||
<!-- Commit Message --> | ||
<xsl:call-template name="TrimCRLFs"> | ||
<xsl:with-param name="InputString"> | ||
<xsl:value-of select="../../msg"/> | ||
</xsl:with-param> | ||
</xsl:call-template> | ||
<xsl:text> </xsl:text> | ||
</xsl:for-each> | ||
</xsl:for-each> | ||
</xsl:template> | ||
|
||
|
||
<xsl:template name="TrimCRLFs"> | ||
<xsl:param name="InputString"/> | ||
<xsl:variable name="RemainingString" | ||
select="substring-before($InputString,' ')"/> | ||
<xsl:value-of select="$RemainingString"/> | ||
</xsl:template> | ||
</xsl:stylesheet> |