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.










share|improve this question


















  • 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

















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.










share|improve this question


















  • 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















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.










share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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
















  • 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



















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















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






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














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





















































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







這個網誌中的熱門文章

Post-Redirect-Get with Spring WebFlux and Thymeleaf

Xamarin.form Move up view when keyboard appear

JBPM : POST request for execute process go wrong