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 Thomas Winkler <th...@yahoo.de> on 2005/09/22 23:06:46 UTC

drawing a continuous border-bottom line (dotted) for table rows

Hello,

I am using the alpha version of Fop 1.0.

I want to create a table with some columns and rows.
Each row must be dotted.
This works fine if all columns are filled with values.

But if some values are missed, then the column is
totally blank.

How can this be avoided ? 

Here my xsl-fo snippet :

...
<fo:table-row>
 <fo:table-cell border-bottom="dotted">
    <fo:block>
	<xsl:value-of select="@order-date"/>
    </fo:block>
....


Thanks in advance !


Thomas






	
		
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

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


Re: drawing a continuous border-bottom line (dotted) for table rows

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Sep 22, 2005, at 23:06, Thomas Winkler wrote:

Hi,

> I am using the alpha version of Fop 1.0.

Cool! Hope you like it so far...

> I want to create a table with some columns and rows.
> Each row must be dotted.
> This works fine if all columns are filled with values.
>
> But if some values are missed, then the column is
> totally blank.

What do you mean exactly? That there is an empty fo:block in the cell?

Try running fop with the '-foout' command-line switch, and check the 
generated FO source document.

In case of there's an empty block element in the cell, this is most 
likely caused by a missing order-date attribute in your XML source (?)

Try adding a non-breaking space like so:

<xsl:if test="not(@order-date)">&#xA0;</xsl:if>
<xsl:value-of select="@order-date" />


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: multiple tables in same row on page

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Sep 23, 2005, at 04:20, Manuel Mall wrote:

> On Fri, 23 Sep 2005 07:23 am, Prakash R wrote:

Hi,

>> I have a fo which looks like this:
>>
>> The number of tables in the fo:block is variable. Is
>> there a way to lay the tables in a single row one
>> after the other and if it does not fit in the same row
>> to go on the next row.

As Manuel already indicated, this is currently not possible (certainly 
not with FOP 0.20.5).

However, the solution Manuel suggests becomes much simpler if you use 
FOP's svn-trunk, which offers support for starts-row and ends-row on 
table-cells. You would not need to generate a row element, but just 
conditionally add an attribute to the enclosing table-cell. This has 
the advantage of making the XSLT much less complicated.

> Also fop does not support auto table layout. This means you have to
> specify column width on each column. If you do that you know the
> overall width of each table and if you know the width of each table you
> know how many fit on each line and then you can create a one row n-cell
> table for each desired output line in your fo file.

True. This is exactly what makes it possible to keep track of the 
accumulated width and add a starts-row property to the cells in 
question. The feature we'd really need to implement for this is 
"fo:inlines with block content", so that we can have inline-tables like 
in HTML.

Now, a kind request for Prakash --a question of mailing-list etiquette. 
The following is what I obtained from the header of the Raw Message:

From: Prakash R <ra...@yahoo.com>
Subject: multiple tables in same row on page
To: fop-users@xmlgraphics.apache.org
In-Reply-To: <20...@jeremias-maerki.ch>

Although it's a nice try to send your post as a reply to someone else's 
thread, delete all content and provide a new subject line, please 
refrain from this in the future. After all, why would you go to all 
that trouble if you can simply choose 'New Message...' and start from 
there?


Thanks!

Greetz,

Andreas


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


Re: multiple tables in same row on page

Posted by Manuel Mall <mm...@arcus.com.au>.
On Fri, 23 Sep 2005 07:23 am, Prakash R wrote:
> I have a fo which looks like this:
>
> <fo:block>
>    <fo:table>
>       .......
>    </fo:table>
>    <fo:table>
>       .......
>    </fo:table>
>    <fo:table>
>       .......
>    </fo:table>
>    <fo:table>
>       .......
>    </fo:table>
> </fo:block>
>
> The number of tables in the fo:block is variable. Is
> there a way to lay the tables in a single row one
> after the other and if it does not fit in the same row
> to go on the next row.
>
> <table1> <table2> <table3>
> <table4> <table5>
>
> In the above example table1, table2 and table3 fit
> across the width of the page. table4 and table5 are on
> the next row.
>
> Each of the individual pages would resize to content
> and so in some cases 2 tables might be on one row
> while in some other case it might be as much as 4 in a
> row.
>
Prakash,

I don't think so (but I have been known to be wrong).

Also fop does not support auto table layout. This means you have to 
specify column width on each column. If you do that you know the 
overall width of each table and if you know the width of each table you 
know how many fit on each line and then you can create a one row n-cell 
table for each desired output line in your fo file.

That is the above becomes something like:

<fo:block>
   <fo:table>
      <fo:table-row>
        <fo:table-cell>
          <fo:table>
          .......
         </fo:table>
        </fo:table-cell>
        <fo:table-cell>
          <fo:table>
          .......
          </fo:table>
        </fo:table-cell>
        <fo:table-cell>
          <fo:table>
          .......
          </fo:table>
        </fo:table-cell>
      </fo:table-row>
    </fo:table>
   <fo:table>
      <fo:table-row>
        <fo:table-cell>
          <fo:table>
          .......
          </fo:table>
        </fo:table-cell>
      </fo:table-row>
    </fo:table>
 </fo:block>

I know that's not quite what you are after as you basically want this 
type of transformation being done automatically by. May be you can do 
that at the XSLT stage?

> Thanks in advance.
>
> Prakash
>
Manuel

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


multiple tables in same row on page

Posted by Prakash R <ra...@yahoo.com>.
I have a fo which looks like this:

<fo:block>
   <fo:table>
      .......
   </fo:table>
   <fo:table>
      .......
   </fo:table>
   <fo:table>
      .......
   </fo:table>
   <fo:table>
      .......
   </fo:table>
</fo:block>

The number of tables in the fo:block is variable. Is
there a way to lay the tables in a single row one
after the other and if it does not fit in the same row
to go on the next row.

<table1> <table2> <table3>
<table4> <table5>

In the above example table1, table2 and table3 fit
across the width of the page. table4 and table5 are on
the next row.

Each of the individual pages would resize to content
and so in some cases 2 tables might be on one row
while in some other case it might be as much as 4 in a
row.

Thanks in advance.

Prakash


		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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


Re: marking some elements by same @id

Posted by Glen Mazza <gm...@apache.org>.
Andreas L Delmelle wrote:

> 
> (Jay's suggestion just rolled in --I'm not 100% sure, but I think FOP 
> will complain if it encounters attributes in the fo: namespace that are 
> not properties as defined in the Rec. FOP 0.20.5 may turn out to be 
> forgiving... Just to be on the safe side, I'd use a separate namespace.)
> 

Looking at the Rec to determine this, I found two possible problems with 
the current way that the rules are written, and have submitted them to 
the XSL-Editors ML for the working group to look over.[1]

Glen

[1] http://lists.w3.org/Archives/Public/xsl-editors/2005OctDec/

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


Re: marking some elements by same @id

Posted by JB...@s-s-t.com.
(Jay's suggestion just rolled in --I'm not 100% sure, but I think FOP 
will complain if it encounters attributes in the fo: namespace that are 
not properties as defined in the Rec. FOP 0.20.5 may turn out to be 
forgiving... Just to be on the safe side, I'd use a separate 
namespace.)

---------------------------------------------------------------------

I hadn't thought of that because I always do all my processing against 
some other XML dialect and generate FO as the last step. A separate 
namespace would be the way to go, for sure.

Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)

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


Re: marking some elements by same @id

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Oct 13, 2005, at 17:33, Thomas Winkler wrote:

Hi,

> <snip />
> If I want to remove the "Position", then the following
> template did that for me :
>
> <xsl:template match="//*[@id='Pos']"/>
>
> Luckily, Xalan does not complain about the non-unique
> values of id.
>
> However; if I want the "Position" in the table then
> FOP will correctly complain "... id values must be
> unique in document."
>
> My question : is there any possibility to mark several
> elements with the same attribute name so that I can
> run such a "remove-template" ?

How about using 'id=posXXX', where the XXX value is the result from 
generate-id()?
In that case, you could have a template similar to what you have now:

<xsl:template match="//*[starts-with(@id,'pos')]" />

Another option would be to introduce a custom namespace for that, and 
define the 'id' attribute in that namespace, so the unique-constraint 
won't apply (since it's no longer the default XML 'id' attribute).

(Jay's suggestion just rolled in --I'm not 100% sure, but I think FOP 
will complain if it encounters attributes in the fo: namespace that are 
not properties as defined in the Rec. FOP 0.20.5 may turn out to be 
forgiving... Just to be on the safe side, I'd use a separate 
namespace.)

HTH!

Greetz,

Andreas


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


Re: marking some elements by same @id

Posted by JB...@s-s-t.com.
The fix for this is to not use "id". You should use an attribute named 
"id" only when you plan to assign a unique identifier to that attribute. 
Otherwise, lots of XML- and XSL-based systems (including but certainly not 
limited to FOP) will break. So, use some other name instead: "myid", 
"groupid", "tableid", "Oscar", whatever.

Jay Bryant
Bryant Communication Systems
(presently consulting at Synergistic Solution Technologies)




Thomas Winkler <th...@yahoo.de> 
10/13/2005 10:33 AM
Please respond to
fop-users@xmlgraphics.apache.org


To
fop-users@xmlgraphics.apache.org
cc

Subject
marking some elements by same @id






Hello,

I am designing a table with the trunk version of FOP.
The table must be configurable.


For example : it depends on the order if the
"Position" should appear or not.

So I created a xsl-fo stylesheet like this :


<fo:table ...>
<fo:table-column column-width="1.5cm"/>
<fo:table-column id="pos" column-width="2cm"/>
<fo:table-column column-width="2cm"/>

<fo:table-header>
<fo:table-row>

<fo:table-cell border-bottom="solid">
<fo:block>
Artikel
</fo:block>
</fo:table-cell>

<fo:table-cell id="pos"  border-bottom="solid">
<fo:block>
Position
</fo:block>
</fo:table-cell>

<fo:table-cell border-bottom="solid"> <fo:block>
Datum
</fo:block>
</fo:table-cell>

</fo:table-row>
</fo:table-header>

<fo:table-body>

<xsl:for-each select="Order">
<fo:table-row>

<fo:table-cell border-bottom="dotted">
<fo:block>
<xsl:value-of select="@name"/>
</fo:block>
</fo:table-cell>

<fo:table-cell id="Pos" border-bottom="dotted">
<fo:block>
<xsl:value-of select="@PosName"/>
</fo:block>
</fo:table-cell>
<fo:table-cell border-bottom="dotted">
<fo:block>
<xsl:value-of select="@date"/>
</fo:block>
</fo:table-cell>
...


If I want to remove the "Position", then the following
template did that for me :

<xsl:template match="//*[@id='Pos']"/>

Luckily, Xalan does not complain about the non-unique
values of id.

However; if I want the "Position" in the table then
FOP will correctly complain "... id values must be
unique in document."

My question : is there any possibility to mark several
elements with the same attribute name so that I can
run such a "remove-template" ?

Or : how can I turn off the unique-id checking of FOP
? 


Thanks in advance !


Thomas





 






 

 
 
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier 
anmelden: http://mail.yahoo.de

---------------------------------------------------------------------
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


marking some elements by same @id

Posted by Thomas Winkler <th...@yahoo.de>.
Hello,

I am designing a table with the trunk version of FOP.
The table must be configurable.


For example : it depends on the order if the
"Position" should appear or not.

So I created a xsl-fo stylesheet like this :


<fo:table ...>
<fo:table-column column-width="1.5cm"/>
<fo:table-column id="pos" column-width="2cm"/>
<fo:table-column column-width="2cm"/>

<fo:table-header>
<fo:table-row>

<fo:table-cell border-bottom="solid">
<fo:block>
Artikel
</fo:block>
</fo:table-cell>

<fo:table-cell id="pos"  border-bottom="solid">
<fo:block>
Position
</fo:block>
</fo:table-cell>

<fo:table-cell border-bottom="solid">		<fo:block>
Datum
</fo:block>
</fo:table-cell>

</fo:table-row>
</fo:table-header>

<fo:table-body>

<xsl:for-each select="Order">
<fo:table-row>

<fo:table-cell border-bottom="dotted">
<fo:block>
<xsl:value-of select="@name"/>
</fo:block>
</fo:table-cell>

<fo:table-cell id="Pos" border-bottom="dotted">
<fo:block>
<xsl:value-of select="@PosName"/>
</fo:block>
</fo:table-cell>
<fo:table-cell border-bottom="dotted">
<fo:block>
<xsl:value-of select="@date"/>
</fo:block>
</fo:table-cell>
...


If I want to remove the "Position", then the following
template did that for me :

<xsl:template match="//*[@id='Pos']"/>

Luckily, Xalan does not complain about the non-unique
values of id.

However; if I want the "Position" in the table then
FOP will correctly complain "... id values must be
unique in document."

My question : is there any possibility to mark several
elements with the same attribute name so that I can
run such a "remove-template" ?

Or : how can I turn off the unique-id checking of FOP
? 


Thanks in advance !


Thomas





 






	

	
		
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

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


Re: Ant: Re: drawing a continuous border-bottom line (dotted) for table rows

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Sep 23, 2005, at 13:12, Thomas Winkler wrote:

> In Fop 20.5; I just wrote the following and it worked
> for solid bottom-border-line up to the end of line.
>
> <fo:table-row border-bottom="solid">
>
> no matter how much "table-cell" I defined.
>
>
> You gave me an answer why this change happenend :
>
> http://www.nabble.com/how-to-deal-with-the-patch-at-Bugzilla-25900- 
> n234174.html

FYI: I'm going to add a little warning for that, so the users at least  
get an idea of why it's not working as they expect --especially  
important for those who migrate from 0.20.5 to 0.90svn (which is what  
the pre-release will be called)


Greetz,

Andreas


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


Ant: Re: drawing a continuous border-bottom line (dotted) for table rows

Posted by Thomas Winkler <th...@yahoo.de>.
--- Andreas L Delmelle <a_...@pandora.be>
schrieb:

> On Sep 22, 2005, at 23:06, Thomas Winkler wrote:
> 
> Hi,
> 
> > I am using the alpha version of Fop 1.0.
> 
> Cool! Hope you like it so far...


Hi, yes; I like it ! Hope it will be released soon ;-)

I had a problem with the continuous dotted
border-bottom line on tables. 

Thanks for your fast reply and tip but Jeremias was
right.  
This problem doesn't exist.


--- Jeremias Maerki <de...@jeremias-maerki.ch> schrieb:

> Please provide a full test file. I can't reproduce
> your problem.
>

My fault; it works nicely indeed.


I defined five <fo:table-column/> elements but only
three <fo:table-cell> elements.
So the dotted line was not continuous up to the end of
line.


In Fop 20.5; I just wrote the following and it worked
for solid bottom-border-line up to the end of line.

<fo:table-row border-bottom="solid"> 

no matter how much "table-cell" I defined.


You gave me an answer why this change happenend :

http://www.nabble.com/how-to-deal-with-the-patch-at-Bugzilla-25900-n234174.html


thanks again!


Thomas




  







	
		
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

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


Re: drawing a continuous border-bottom line (dotted) for table rows

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Please provide a full test file. I can't reproduce your problem.

On 22.09.2005 23:06:46 Thomas Winkler wrote:
> Hello,
> 
> I am using the alpha version of Fop 1.0.
> 
> I want to create a table with some columns and rows.
> Each row must be dotted.
> This works fine if all columns are filled with values.
> 
> But if some values are missed, then the column is
> totally blank.
> 
> How can this be avoided ? 
> 
> Here my xsl-fo snippet :
> 
> ...
> <fo:table-row>
>  <fo:table-cell border-bottom="dotted">
>     <fo:block>
> 	<xsl:value-of select="@order-date"/>
>     </fo:block>
> ....
> 
> 
> Thanks in advance !
> 
> 
> Thomas


Jeremias Maerki


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