<xsl:template match="text()">
<span class="lit">
- <xsl:value-of select="."/>
+ <xsl:call-template name="break">
+ <xsl:with-param name="text" select="."/>
+ </xsl:call-template>
</span>
</xsl:template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
+
+ <xsl:template name="break">
+ <xsl:param name="text" select="."/>
+ <xsl:choose>
+ <xsl:when test="contains($text, '
')">
+ <xsl:value-of select="substring-before($text, '
')"/>
+ <br/>
+ <xsl:call-template name="break">
+ <xsl:with-param name="text" select="substring-after($text, '
')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$text"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
</xsl:transform>
else if(c == '\r')
Text("\\r");
else if(c == '\n')
- Text("\\n");
+ Text(" ");
else {
unsigned char octal0 = c & 0x7;
unsigned char octal1 = (c >> 3) & 0x7;
else if(c == '\r')
Text("\\r");
else if(c == '\n')
- Text("\\n");
+ Text(" ");
else {
unsigned octal0 = c & 0x7;
unsigned octal1 = (c >> 3) & 0x7;