Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Commit

Permalink
Added filter to strip CRLFs from incoming messages
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmccullough committed Oct 21, 2009
1 parent 7a73664 commit 8477155
Showing 1 changed file with 30 additions and 13 deletions.
43 changes: 30 additions & 13 deletions svnlog2cc.xslt
@@ -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&#10;</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>&#10;</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>&#10;</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,'&#10;')"/>
<xsl:value-of select="$RemainingString"/>
</xsl:template>
</xsl:stylesheet>

0 comments on commit 8477155

Please sign in to comment.