Merge pull request #822 from MrDevKing/feature_validation_pdf_wrapping_msg_txt
Wrapping Message Text in Validation Result PDF
This commit is contained in:
@@ -276,7 +276,9 @@
|
|||||||
<fo:block color="{$msg_color}"
|
<fo:block color="{$msg_color}"
|
||||||
margin="0mm"
|
margin="0mm"
|
||||||
padding="1mm">
|
padding="1mm">
|
||||||
<xsl:value-of select="$msg_text"/>
|
<xsl:call-template name="IntersperseWithZeroSpaces">
|
||||||
|
<xsl:with-param name="str" select="$msg_text"/>
|
||||||
|
</xsl:call-template>
|
||||||
</fo:block>
|
</fo:block>
|
||||||
</fo:table-cell>
|
</fo:table-cell>
|
||||||
</fo:table-row>
|
</fo:table-row>
|
||||||
@@ -349,4 +351,27 @@
|
|||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
<xsl:template name="IntersperseWithZeroSpaces">
|
||||||
|
<xsl:param name="str"/>
|
||||||
|
<xsl:variable name="spacechars">
|
||||||
|
	

|
||||||
|
      
|
||||||
|
     ​
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:if test="string-length($str) > 0">
|
||||||
|
<xsl:variable name="c1" select="substring($str, 1, 1)"/>
|
||||||
|
<xsl:variable name="c2" select="substring($str, 2, 1)"/>
|
||||||
|
|
||||||
|
<xsl:value-of select="$c1"/>
|
||||||
|
<xsl:if test="$c2 != '' and
|
||||||
|
not(contains($spacechars, $c1) or
|
||||||
|
contains($spacechars, $c2))">
|
||||||
|
<xsl:text>​</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
<xsl:call-template name="IntersperseWithZeroSpaces">
|
||||||
|
<xsl:with-param name="str" select="substring($str, 2)"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
|||||||
Reference in New Issue
Block a user