Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/294.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# xslt中的空白_C#_Whitespace - Fatal编程技术网

C# xslt中的空白

C# xslt中的空白,c#,whitespace,C#,Whitespace,我正在尝试生成一个包含一些空格的报告,以使内容看起来很好。但问题是出于某种原因,空间的数量在某些情况下是固定的,甚至是减少的 例如,我有一个内容应该是这样的: <fo:block white-space-collapse="false" usage-context-of-suppress-at-line-break="ignore"> <xsl:variable name="report_text">

我正在尝试生成一个包含一些空格的报告,以使内容看起来很好。但问题是出于某种原因,空间的数量在某些情况下是固定的,甚至是减少的

例如,我有一个内容应该是这样的:

<fo:block   white-space-collapse="false"  usage-context-of-suppress-at-line-break="ignore">
                          <xsl:variable name="report_text">
                            <value>
                              <xsl:value-of select="REPORT_TEXT" />
                            </value>
                          </xsl:variable>

                          <xsl:value-of select="DataConvertObject:ConvertToPlainText($report_text)" /> 
</fo:block>
 <fo:table-cell column-number="2" number-columns-spanned="5"  font-family="Lucida Console"  >
格式化文本

但看起来是这样的

未格式化文本

xslt块如下所示:

<fo:block   white-space-collapse="false"  usage-context-of-suppress-at-line-break="ignore">
                          <xsl:variable name="report_text">
                            <value>
                              <xsl:value-of select="REPORT_TEXT" />
                            </value>
                          </xsl:variable>

                          <xsl:value-of select="DataConvertObject:ConvertToPlainText($report_text)" /> 
</fo:block>
 <fo:table-cell column-number="2" number-columns-spanned="5"  font-family="Lucida Console"  >

有什么想法吗?建议?

我找到了解决方案

问题是我选择的字体的每个字母都有不同的大小,所以我将字体改成如下:

<fo:block   white-space-collapse="false"  usage-context-of-suppress-at-line-break="ignore">
                          <xsl:variable name="report_text">
                            <value>
                              <xsl:value-of select="REPORT_TEXT" />
                            </value>
                          </xsl:variable>

                          <xsl:value-of select="DataConvertObject:ConvertToPlainText($report_text)" /> 
</fo:block>
 <fo:table-cell column-number="2" number-columns-spanned="5"  font-family="Lucida Console"  >

而且效果很好

我找到了解决方案

问题是我选择的字体的每个字母都有不同的大小,所以我将字体改成如下:

<fo:block   white-space-collapse="false"  usage-context-of-suppress-at-line-break="ignore">
                          <xsl:variable name="report_text">
                            <value>
                              <xsl:value-of select="REPORT_TEXT" />
                            </value>
                          </xsl:variable>

                          <xsl:value-of select="DataConvertObject:ConvertToPlainText($report_text)" /> 
</fo:block>
 <fo:table-cell column-number="2" number-columns-spanned="5"  font-family="Lucida Console"  >

而且效果很好

添加可能会有所帮助。添加可能会有所帮助。