Hit send too early.

If you create a variable which contains the #, then you can use concat and 
normalize-space to create the string you want.

<xsl:variable name="aHash"><xsl:if test="RC[.!=''] and RCOVERRIDE[.!='Y']">
  <xsl:if test="RCMODIFIED[.='Y']">#</xsl:if>
</xsl:if>
</xsl:variable>

Then in the code:

<xsl:value-of select="concat(normalize-space($aHash),normalize-space(RC))"/>

(Typed, not tested...)

Best regards,
Tom Morrison
Senior Manager, Systems Software Projects
 
Micro Focus
thomas.morri...@microfocus.com
8310 N Capital of Texas Hwy
Building 2, Suite 100
Austin, TX 78731
USA
 
ShoreTel: 27018
Direct: +1.512.340.4822
Mobile: +1.512.785.9347


-----Original Message-----
From: Thomas Morrison [mailto:thomas.morri...@microfocus.com] 
Sent: Friday, June 22, 2012 2:13 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: White Space Added but Not Needed

Rita,

There are a couple of different techniques you can use better to control the 
whitespace.

First, you could use an <xsl:choose> which would allow you to construct an 
if-then-else so you can specify completely either a "28" or #28 without dealing 
with the whitespace problem.

Second, the concat() function in this situation might very well be a good 
friend, when used with normalize-space.

Con
Best regards,
Tom Morrison
Senior Manager, Systems Software Projects
 
Micro Focus

-----Original Message-----
From: Rita Greenberg [mailto:rgreenb...@medata.com] 
Sent: Friday, June 22, 2012 12:57 PM
To: fop-users@xmlgraphics.apache.org
Subject: White Space Added but Not Needed

Hello.

In my xsl:fo stylesheet I'm using wrap-option="wrap" on a fo:cell level.
I'm printing a hash (#) sign before an xml element if a cetain condition is met.

So, my element has, for example, a value of "28" and if the condition is met I 
want to print #28. The problem is that I get # 28. A space is being added that 
I never asked for!

I've tried using strip-space, and normalize-space but niether of them worked.

The interesting thing is that when I wrap the # within a fo:inline, I don;t get 
the space but then I don't get the wrapping either.

Here's my code.

[code]

<xsl:if test="RC[.!=''] and RCOVERRIDE[.!='Y']">
  <xsl:if test="RCMODIFIED[.='Y']">#
  </xsl:if>
  <xsl:value-of select="RC"/>
  <fo:inline font-size="4pt">&#160;</fo:inline>
</xsl:if>

[code]

Thanks,
Rita


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


This message has been scanned by MailController - portal1.mailcontroller.co.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to