RE: White Space Added but Not Needed
What happens when you use the following? # Eric Amick Systems Engineer II Legislative Computer Systems > -Original Message- > From: Rita Greenberg [mailto:[email protected]] > Sent: Monday, June 25, 2012 17:50 > To: [email protected] > Subject: Re: White Space Added but Not Needed > > Thanks Pascal - I tried that but am still getting a space between the # > and 28. > I need #28. > > > - > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: White Space Added but Not Needed
Hi, If you get a space between # and 28, this is because it is added during XSLT stage, probably because of linefeeds or spaces around text nodes. Strictly speaking, this is out of topic in this list. That said, if you want to avoid such unexpected spaces in XSL-FO output, you have to embed all your text nodes in a xslt construction: some text You have to check by yourself that the produced XSL-FO gives text nodes without unwanted spaces: some textresult_of_value-of_evaluation 2012/6/25 Rita Greenberg : > Thanks Pascal - I tried that but am still getting a space between the # and > 28. > I need #28. -- pascal - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: White Space Added but Not Needed
Thanks Pascal - I tried that but am still getting a space between the # and 28. I need #28. - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: White Space Added but Not Needed
Hi 2012/6/22 Rita Greenberg : > Oops - I thought it worked but no - it's not! > In my xsl:fo stylesheet I'm using wrap-option="wrap" on a fo:cell level. FOP has limited support for wrap-option: only for fo:block. See Compliance page at [1]. That said, FOP breaking algorithm needs a break opportunity to insert a break line. If you want a such opportunity between 2 characters that usually remain stuck, you have to insert a ZWSP () between them, like that: #28 [1] http://xmlgraphics.apache.org/fop/compliance.html#fo-property-wrap-option -- pascal - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: White Space Added but Not Needed
Oops - I thought it worked but no - it's not! - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: White Space Added but Not Needed
Thanks Thomas! This time I got it to work correctly. I used: [code] # Much appreciated! - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: White Space Added but Not Needed
Thanks Thomas. I tried that and the space disappeared but the wrapping was gone also! - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
RE: White Space Added but Not Needed
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. # Then in the code: (Typed, not tested...) Best regards, Tom Morrison Senior Manager, Systems Software Projects Micro Focus [email protected] 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:[email protected]] Sent: Friday, June 22, 2012 2:13 PM To: [email protected] 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 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:[email protected]] Sent: Friday, June 22, 2012 12:57 PM To: [email protected] 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] # [code] Thanks, Rita - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] This message has been scanned by MailController - portal1.mailcontroller.co.uk - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
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 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:[email protected]] Sent: Friday, June 22, 2012 12:57 PM To: [email protected] 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] # [code] Thanks, Rita - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] This message has been scanned by MailController - portal1.mailcontroller.co.uk - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: White Space Added but Not Needed
Glenn Adams skynav.com> writes: > > > this is a problem with your XSL style sheet, not with FOP processing; you should review the XSL-FO output from the XSLT process to see what the real input to FOP is > > Thanks Glen. I need to figure out how to review the XSL-FO output. - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: White Space Added but Not Needed
Amick, Eric mail.house.gov> writes: > > But you *do* ask for whitespace-the newline after the # sign and the spaces at the start of the following line > do that. Use # instead. > > Eric Amick Systems Engineer II > Legislative Computer Systems > Thanks Eric for your quick response. I tried and that removed the white space - however I lost my wrapping! The cell's contents overflowed with the prior cell. - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
RE: White Space Added but Not Needed
But you *do* ask for whitespace-the newline after the # sign and the spaces at the start of the following line do that. Use # instead. Eric Amick Systems Engineer II Legislative Computer Systems > -Original Message- > From: Rita Greenberg [mailto:[email protected]] > Sent: Friday, June 22, 2012 13:57 > To: [email protected] > 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] > > > # > > > > > > [code] > > Thanks, > Rita > > > - > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: White Space Added but Not Needed
this is a problem with your XSL style sheet, not with FOP processing; you should review the XSL-FO output from the XSLT process to see what the real input to FOP is On Fri, Jun 22, 2012 at 11:57 AM, Rita Greenberg wrote: > 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] > > > # > > > > > > [code] > > Thanks, > Rita > > > - > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
