You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Steffanina, Jeff" <Je...@marriott.com> on 2008/08/08 21:57:57 UTC

Fop-0.95 - Table questions

I have a table that is 8 cols by many rows.

TABLE ISSUE  I
The column "ItemDesc" is left aligned.  BUT on occasion, the ItemDesc
begins with 4 leading spaces.  In my output .PDF, the leading spaces are
always removed.

How can I force the leading spaces in the ItemDesc to be included in the
output?  Here is what I currently have for the field:
<fo:table-cell>
      <fo:block>
        <xsl:attribute name="white-space-collapse">false</xsl:attribute>
        <xsl:value-of select="itemdesc"/>
      </fo:block>
    </fo:table-cell>

TABLE ISSUE II
Of the 8 columns in my table, I only need to print 5 of them.  The other
3 cols are used to evaluate the record and evaluate data using "test".
My problem is that It seems that once the table is defined and values
selected, you have no choice but to print the value.

How can I keep populated objects in a table from printing?

Thanks for your assistance.

Jeff 

RE: Fop-0.95 - Table questions

Posted by "Steffanina, Jeff" <Je...@marriott.com>.
Andreas,
I see your point.  That is exactly what I needed to know.
 
Thanks
 

________________________________

From: Andreas Delmelle [mailto:andreas.delmelle@telenet.be]
Sent: Sat 8/9/2008 9:06 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Fop-0.95 - Table questions



On Aug 8, 2008, at 21:57, Steffanina, Jeff wrote:

Hi

Sorry, just noticed there was a second question that didn't get 
answered yet...

> TABLE ISSUE II
> Of the 8 columns in my table, I only need to print 5 of them.  The 
> other 3 cols are used to evaluate the record and evaluate data 
> using "test".  My problem is that It seems that once the table is 
> defined and values selected, you have no choice but to print the 
> value.
>
> How can I keep populated objects in a table from printing?
>
You're giving us very little to go with here, but it seems to me like 
this needs to be caught in the XSLT stage. Instead of blindly 
generating cells/columns for all eight 'columns' in the input, you 
need to exclude those, and make sure they are skipped (so the FO only 
gets to contain five columns, not eight).
As soon as a fo:table-cell is generated with some content, no 
mechanism in XSL-FO exists to magically ignore those during 
formatting. It's not like you can do any 'evaluation' in the strict 
sense during formatting anyway, so I'm assuming what you describe 
above as 'evaluate the record and evaluate data' takes place in some 
xsl:template. Just avoid generating fo:table-cells for the 
corresponding elements, and you should be fine.

HTH!

Cheers

Andreas

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



Re: Fop-0.95 - Table questions

Posted by Andreas Delmelle <an...@telenet.be>.
On Aug 8, 2008, at 21:57, Steffanina, Jeff wrote:

Hi

Sorry, just noticed there was a second question that didn't get  
answered yet...

> TABLE ISSUE II
> Of the 8 columns in my table, I only need to print 5 of them.  The  
> other 3 cols are used to evaluate the record and evaluate data  
> using "test".  My problem is that It seems that once the table is  
> defined and values selected, you have no choice but to print the  
> value.
>
> How can I keep populated objects in a table from printing?
>
You're giving us very little to go with here, but it seems to me like  
this needs to be caught in the XSLT stage. Instead of blindly  
generating cells/columns for all eight 'columns' in the input, you  
need to exclude those, and make sure they are skipped (so the FO only  
gets to contain five columns, not eight).
As soon as a fo:table-cell is generated with some content, no  
mechanism in XSL-FO exists to magically ignore those during  
formatting. It's not like you can do any 'evaluation' in the strict  
sense during formatting anyway, so I'm assuming what you describe  
above as 'evaluate the record and evaluate data' takes place in some  
xsl:template. Just avoid generating fo:table-cells for the  
corresponding elements, and you should be fine.

HTH!

Cheers

Andreas

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


RE: Fop-0.95 - Table questions

Posted by "Steffanina, Jeff" <Je...@marriott.com>.

I resolved it... You have to use:

name="white-space-treatment">preserve 


Jeff Steffanina
FOSSE Development,  Bethesda, MD
(301)380-2047
jeff.steffanina@marriott.com

    This communication contains information from Marriott International,
Inc. that may be confidential. Except for personal use by the intended
recipient, or as expressly authorized by the sender, any person who
receives this information is prohibited from disclosing, copying,
distributing, and/or using it. If you have received this communication
in error, please immediately delete it and all copies, and promptly
notify the sender. Nothing in this communication is intended as an
electronic signature under applicable law.


-----Original Message-----
From: Steffanina, Jeff [mailto:Jeff.Steffanina@marriott.com] 
Sent: Friday, August 08, 2008 4:49 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Fop-0.95 - Table questions


   
WHEN I CHANGED IT TO PRESERVE AS BELOW:
<fo:table-cell>
      <fo:block>
        <xsl:attribute
name="white-space-collapse">preserve</xsl:attribute>
        <xsl:value-of select="item"/>
      </fo:block>
    </fo:table-cell>


I GOT THE FOLLOWING ERROR:
SEVERE: Ignoring property: white-space-collapse="preserve" (No
conversion defined preserve; property:'white-space-collapse')
Aug 8, 2008 4:45:39 PM org.apache.fop.fo.PropertyList
convertAttributeToProperty 


Jeff Steffanina
FOSSE Development,  Bethesda, MD
(301)380-2047
jeff.steffanina@marriott.com

    This communication contains information from Marriott International,
Inc. that may be confidential. Except for personal use by the intended
recipient, or as expressly authorized by the sender, any person who
receives this information is prohibited from disclosing, copying,
distributing, and/or using it. If you have received this communication
in error, please immediately delete it and all copies, and promptly
notify the sender. Nothing in this communication is intended as an
electronic signature under applicable law.


-----Original Message-----
From: Andreas Delmelle [mailto:andreas.delmelle@telenet.be] 
Sent: Friday, August 08, 2008 4:39 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Fop-0.95 - Table questions

On Aug 8, 2008, at 21:57, Steffanina, Jeff wrote:

Hi
> TABLE ISSUE  I
> The column "ItemDesc" is left aligned.  BUT on occasion, the  
> ItemDesc begins with 4 leading spaces.  In my output .PDF, the  
> leading spaces are always removed.
>
> How can I force the leading spaces in the ItemDesc to be included  
> in the output?  Here is what I currently have for the field:
>
> <fo:table-cell>
>       <fo:block>
>         <xsl:attribute name="white-space-collapse">false</ 
> xsl:attribute>
>

Try adding:
   <xsl:attribute name="white-space-treatment">preserve</xsl:attribute>

This will effectively preserve any white-space, including spaces  
surrounding line-breaks.


HTH!

Andreas

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

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

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


RE: Fop-0.95 - Table questions

Posted by "Steffanina, Jeff" <Je...@marriott.com>.
   
WHEN I CHANGED IT TO PRESERVE AS BELOW:
<fo:table-cell>
      <fo:block>
        <xsl:attribute
name="white-space-collapse">preserve</xsl:attribute>
        <xsl:value-of select="item"/>
      </fo:block>
    </fo:table-cell>


I GOT THE FOLLOWING ERROR:
SEVERE: Ignoring property: white-space-collapse="preserve" (No
conversion defined preserve; property:'white-space-collapse')
Aug 8, 2008 4:45:39 PM org.apache.fop.fo.PropertyList
convertAttributeToProperty 


Jeff Steffanina
FOSSE Development,  Bethesda, MD
(301)380-2047
jeff.steffanina@marriott.com

    This communication contains information from Marriott International,
Inc. that may be confidential. Except for personal use by the intended
recipient, or as expressly authorized by the sender, any person who
receives this information is prohibited from disclosing, copying,
distributing, and/or using it. If you have received this communication
in error, please immediately delete it and all copies, and promptly
notify the sender. Nothing in this communication is intended as an
electronic signature under applicable law.


-----Original Message-----
From: Andreas Delmelle [mailto:andreas.delmelle@telenet.be] 
Sent: Friday, August 08, 2008 4:39 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Fop-0.95 - Table questions

On Aug 8, 2008, at 21:57, Steffanina, Jeff wrote:

Hi
> TABLE ISSUE  I
> The column "ItemDesc" is left aligned.  BUT on occasion, the  
> ItemDesc begins with 4 leading spaces.  In my output .PDF, the  
> leading spaces are always removed.
>
> How can I force the leading spaces in the ItemDesc to be included  
> in the output?  Here is what I currently have for the field:
>
> <fo:table-cell>
>       <fo:block>
>         <xsl:attribute name="white-space-collapse">false</ 
> xsl:attribute>
>

Try adding:
   <xsl:attribute name="white-space-treatment">preserve</xsl:attribute>

This will effectively preserve any white-space, including spaces  
surrounding line-breaks.


HTH!

Andreas

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

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


Re: Fop-0.95 - Table questions

Posted by Andreas Delmelle <an...@telenet.be>.
On Aug 8, 2008, at 21:57, Steffanina, Jeff wrote:

Hi
> TABLE ISSUE  I
> The column "ItemDesc" is left aligned.  BUT on occasion, the  
> ItemDesc begins with 4 leading spaces.  In my output .PDF, the  
> leading spaces are always removed.
>
> How can I force the leading spaces in the ItemDesc to be included  
> in the output?  Here is what I currently have for the field:
>
> <fo:table-cell>
>       <fo:block>
>         <xsl:attribute name="white-space-collapse">false</ 
> xsl:attribute>
>

Try adding:
   <xsl:attribute name="white-space-treatment">preserve</xsl:attribute>

This will effectively preserve any white-space, including spaces  
surrounding line-breaks.


HTH!

Andreas

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