![]() |
Help required in FO !!!! |
Post Reply
|
| Author | |
vijju
Newbie
Joined: 19 Apr 2011 Location: India Posts: 22 |
Post Options
Quote Reply
Topic: Help required in FO !!!!Posted: 14 Sep 2011 at 6:14am |
|
<xsl:if test="IsTopper='Y'"> <fo:block> <xfd:subdocument-content xfd:src="url(.\StudentGrades..xfc)" xf:dt-height="0.146in"> <xfd:subdocument-parameter name="SName" value="StudentName"/> </xfd:subdocument-content> </fo:block> </xsl:if> <xsl:if test="IsTopper='N'"> <fo:block> <xfd:subdocument-content xfd:src="url(.\StudentGrades.xfc)" xf:dt-height="0.146in"> <xfd:subdocument-parameter name="SName" value="StudentName"/> </xfd:subdocument-content> </fo:block> </xsl:if> The Output of the above is: John Thomas One John Thomas Two But we want the output to be as follows (adding Student as prefix and appending string , Topper for top student and ,Non-Topper for other students): Student John Thomas One, Topper Student John Thomas Two, Non-Topper Could someone please suggest how to modify the above code to achieve the desired output? |
|
![]() |
|
radup
Admin Group
Adminstrator Joined: 19 May 2008 Posts: 83 |
Post Options
Quote Reply
Posted: 14 Sep 2011 at 7:35am |
|
Hi vijju,
You can pass IsTopper as parameter to the component. You nee just to modify your component to write if is "Topper" or not. And you will have something like this:
|
|
![]() |
|
vijju
Newbie
Joined: 19 Apr 2011 Location: India Posts: 22 |
Post Options
Quote Reply
Posted: 14 Sep 2011 at 7:59am |
|
Hi Radup,
Thanks for the prompt reply.
Is it not possible to concatinate the required strings in the block itself, i.e.,without modifying the component?
Thanks !!!
|
|
![]() |
|
radup
Admin Group
Adminstrator Joined: 19 May 2008 Posts: 83 |
Post Options
Quote Reply
Posted: 14 Sep 2011 at 8:17am |
|
No because the component generates a paragraph break.
|
|
![]() |
|
vijju
Newbie
Joined: 19 Apr 2011 Location: India Posts: 22 |
Post Options
Quote Reply
Posted: 14 Sep 2011 at 8:38am |
|
Thanks Radup.
I will get back to you in case of any queries.
Thanks a ton :)
|
|
![]() |
|
vijju
Newbie
Joined: 19 Apr 2011 Location: India Posts: 22 |
Post Options
Quote Reply
Posted: 15 Sep 2011 at 7:38am |
|
Hi Radup,
Your suggestion worked. Thanks!!! Now i can see the output in the following format (the way i required):
John - Topper
Mike - Topper
John Kennedy - Non Topper
Is there any way to display the above result in the following way (the above three results as a single string separated by ,) by modifying the component or block from which we are calling the component?
John - Topper, Mike - Topper, John Kennedy - Non Topper |
|
![]() |
|
radup
Admin Group
Adminstrator Joined: 19 May 2008 Posts: 83 |
Post Options
Quote Reply
Posted: 15 Sep 2011 at 7:46am |
|
Hi Vijju,
In order to do this you need to move the repeating logic in your component, and use an "inline repeat".
Edited by admin - 17 Sep 2011 at 7:22am |
|
![]() |
|
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |