Apache-FO -how to align 2 block within cell vertically
up vote
0
down vote
favorite
I'm creating a table with apache-fo. And fail to position the blocks one at the top (or center would be also ok ...) AND one at the bottom of given container.
Each cell is containing:
1. Name
2. Size
The name length vary, so the heigh of the cell in row is dynamic.
This is simplified cell:
<fo:table-cell>
<fo:block display-align="before">
<xsl:value-of select="name" />
</fo:block>
<fo:block display-align="after">
<xsl:value-of select="size" />
</fo:block>
</fo:table-cell>
I would like to generate a cell where the Name is aligned to top and Size to the bottom of the cell.
I manage to align both blocks to top OR bottom, when setting But not independent ...
This is want i have:
-------------------------------------------------
some short name | some very long | some long |
size:56 | name which | name |
| takes 3 lines | size:2 |
| size:12 | |
-------------------------------------------------
some longer | some otherlong | name4 |
name | name which | size:4 |
size:56 | takes 3 lines | |
| size:14 | |
-------------------------------------------------
This is the goal:
-------------------------------------------------
some short name | some very long | some long |
| name which | name |
| takes 3 lines | |
size:56 | size:12 | size:2 |
-------------------------------------------------
some longer | some otherlong | name4 |
name | name which | |
| takes 3 lines | |
size:56 | size:14 | size:4 |
-------------------------------------------------
Can anyone help me out, if there is a way to achive this with apache-fo?
Big thanks in advance.
xsl-fo
add a comment |
up vote
0
down vote
favorite
I'm creating a table with apache-fo. And fail to position the blocks one at the top (or center would be also ok ...) AND one at the bottom of given container.
Each cell is containing:
1. Name
2. Size
The name length vary, so the heigh of the cell in row is dynamic.
This is simplified cell:
<fo:table-cell>
<fo:block display-align="before">
<xsl:value-of select="name" />
</fo:block>
<fo:block display-align="after">
<xsl:value-of select="size" />
</fo:block>
</fo:table-cell>
I would like to generate a cell where the Name is aligned to top and Size to the bottom of the cell.
I manage to align both blocks to top OR bottom, when setting But not independent ...
This is want i have:
-------------------------------------------------
some short name | some very long | some long |
size:56 | name which | name |
| takes 3 lines | size:2 |
| size:12 | |
-------------------------------------------------
some longer | some otherlong | name4 |
name | name which | size:4 |
size:56 | takes 3 lines | |
| size:14 | |
-------------------------------------------------
This is the goal:
-------------------------------------------------
some short name | some very long | some long |
| name which | name |
| takes 3 lines | |
size:56 | size:12 | size:2 |
-------------------------------------------------
some longer | some otherlong | name4 |
name | name which | |
| takes 3 lines | |
size:56 | size:14 | size:4 |
-------------------------------------------------
Can anyone help me out, if there is a way to achive this with apache-fo?
Big thanks in advance.
xsl-fo
1
Why don't you create another table row (containing the size information), vertically aligned to the bottom and without the top border? IMHO it will the simplest - if not the only - way to achieve what you'd like to do.
– potame
Nov 7 at 13:07
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm creating a table with apache-fo. And fail to position the blocks one at the top (or center would be also ok ...) AND one at the bottom of given container.
Each cell is containing:
1. Name
2. Size
The name length vary, so the heigh of the cell in row is dynamic.
This is simplified cell:
<fo:table-cell>
<fo:block display-align="before">
<xsl:value-of select="name" />
</fo:block>
<fo:block display-align="after">
<xsl:value-of select="size" />
</fo:block>
</fo:table-cell>
I would like to generate a cell where the Name is aligned to top and Size to the bottom of the cell.
I manage to align both blocks to top OR bottom, when setting But not independent ...
This is want i have:
-------------------------------------------------
some short name | some very long | some long |
size:56 | name which | name |
| takes 3 lines | size:2 |
| size:12 | |
-------------------------------------------------
some longer | some otherlong | name4 |
name | name which | size:4 |
size:56 | takes 3 lines | |
| size:14 | |
-------------------------------------------------
This is the goal:
-------------------------------------------------
some short name | some very long | some long |
| name which | name |
| takes 3 lines | |
size:56 | size:12 | size:2 |
-------------------------------------------------
some longer | some otherlong | name4 |
name | name which | |
| takes 3 lines | |
size:56 | size:14 | size:4 |
-------------------------------------------------
Can anyone help me out, if there is a way to achive this with apache-fo?
Big thanks in advance.
xsl-fo
I'm creating a table with apache-fo. And fail to position the blocks one at the top (or center would be also ok ...) AND one at the bottom of given container.
Each cell is containing:
1. Name
2. Size
The name length vary, so the heigh of the cell in row is dynamic.
This is simplified cell:
<fo:table-cell>
<fo:block display-align="before">
<xsl:value-of select="name" />
</fo:block>
<fo:block display-align="after">
<xsl:value-of select="size" />
</fo:block>
</fo:table-cell>
I would like to generate a cell where the Name is aligned to top and Size to the bottom of the cell.
I manage to align both blocks to top OR bottom, when setting But not independent ...
This is want i have:
-------------------------------------------------
some short name | some very long | some long |
size:56 | name which | name |
| takes 3 lines | size:2 |
| size:12 | |
-------------------------------------------------
some longer | some otherlong | name4 |
name | name which | size:4 |
size:56 | takes 3 lines | |
| size:14 | |
-------------------------------------------------
This is the goal:
-------------------------------------------------
some short name | some very long | some long |
| name which | name |
| takes 3 lines | |
size:56 | size:12 | size:2 |
-------------------------------------------------
some longer | some otherlong | name4 |
name | name which | |
| takes 3 lines | |
size:56 | size:14 | size:4 |
-------------------------------------------------
Can anyone help me out, if there is a way to achive this with apache-fo?
Big thanks in advance.
xsl-fo
xsl-fo
asked Nov 7 at 11:42
Jabbi
1
1
1
Why don't you create another table row (containing the size information), vertically aligned to the bottom and without the top border? IMHO it will the simplest - if not the only - way to achieve what you'd like to do.
– potame
Nov 7 at 13:07
add a comment |
1
Why don't you create another table row (containing the size information), vertically aligned to the bottom and without the top border? IMHO it will the simplest - if not the only - way to achieve what you'd like to do.
– potame
Nov 7 at 13:07
1
1
Why don't you create another table row (containing the size information), vertically aligned to the bottom and without the top border? IMHO it will the simplest - if not the only - way to achieve what you'd like to do.
– potame
Nov 7 at 13:07
Why don't you create another table row (containing the size information), vertically aligned to the bottom and without the top border? IMHO it will the simplest - if not the only - way to achieve what you'd like to do.
– potame
Nov 7 at 13:07
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53188787%2fapache-fo-how-to-align-2-block-within-cell-vertically%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Why don't you create another table row (containing the size information), vertically aligned to the bottom and without the top border? IMHO it will the simplest - if not the only - way to achieve what you'd like to do.
– potame
Nov 7 at 13:07