Adding LineBreak in List-item XSLT - xslt-1.0

Can someone tell me how I can add a break between the item-label and the body.
So first I want the firstname on a line. then a line with nothing and then the name John on a new line:
this is the code I have tried a lot but nothing works:
I am unsing Apache FOP to turn mij XSL into PDF
<fo:list-item>
<fo:list-item-label><fo:block>FirstName:</fo:block></fo:list-item-label>
<fo:list-item-body><fo:block>John</fo:block></fo:list-item-body>
</fo:list-item>
Thanks!

As far as I know, list-item is designed for placing elements side-by-side, not above each other.
Anyway, you don't need the list-item at all. Just create 2 blocks with the information you need, and they'll be placed one above the other automatically.
Specify space-after on the first block to get the empty line:
<fo:block space-after="12pt">

Related

fo:change-bar-begin is not a child of fo:inline fop 1.1

I am using FOP 1.1 and I am trying to make use of fo:change-bar-begin, but I am getting the following error:
org.apache.fop.fo.ValidationException: "fo:change-bar-begin" is not a valid child of "fo:inline"!
According to W3C Recommandation, change-bar-begin and change-bar-end define "points" and may be used anywhere as a descendant of fo:flow or fo:static-content, basically in any fo:block or fo:inline.
Sample code:
<fo:block background-color="Tomato" text-indent="-57.5pt" start-indent="57.5pt">
<fo:inline background-color="aquamarine" font-size="10" font-family="Arial, sans-serif">1.</fo:inline>
<fo:change-bar-begin change-bar-offset="2mm" change-bar-color="red" change-bar-style="solid" change-bar-class="cc01"/>
<fo:inline background-color="LightSteelBlue" keep-with-previous="always" font-size="10" font-family="Arial, sans-serif" padding-left="48.39pt">Remove panel.</fo:inline>
<fo:change-bar-end change-bar-class="cc01"/>
</fo:block>
What do I do wrong?
Thank you!
Florin
It looks okay to me, and you are correct about fo:change-bar-begin being allowed anywhere as a descendant of fo:flow or fo:static-content. So this looks like it is a FOP bug.
In your example, fo:change-bar-begin is not actually a child of fo:inline. Did you try putting the change bar FOs inside the fo:inline?
FWIW, there is a formatted change bar example in the "Comprehensive XSL-FO Tutorials and Samples Collection" at https://www.antennahouse.com/antenna1/comprehensive-xsl-fo-tutorials-and-samples-collection/.

How to use special characters on pentaho Dashboard

I'm trying to use special characters on my dashboard using a HTML structure.
It only works if I use HTML Entities such as "& atilde;" (without space) for ã.
But is it the only way to do it? Is there anywhere I can set UTF-8, for example?
I tried to put a META tag setting UTF-8, but I didn't work.
Here's what I'm doying:
Input:
Output:
I need to type: "Alocação de Funcionários"
Notice that I also set a custom noDataMessage_text on Advanced Properties > Extension points of my first Bar Char and, since the message also have special characters on it, using the HTML Entity would certainly not be a good idea.
UPDATE:
I have the same problem when I was looking for my Cubes when I was using the OLAP Selector Wizard
I think your problem will solve. You can use like these.
<h1 style="font-weight: bold;"> Alocação de Funcionários<h1>
or
<h1 style="color:#297385l"> AlocaÇão de Funcionários</h1>
I got these output in my dashboard.
I am thinking your font family is creating some issue. Please copy the exact h1 tag line and paste it in your dashboard let's see.
Thank you.

In aspdotnetstorefront, how can I add a different banner to each category without making different skins?

My goal is to add different banners to the bottom of each category, right below the list of products.
This could be accomplished in the following ways, but I'm not sure how to do it in aspdotnetstorefront:
Add custom CSS per category
Add custom HTML per category
I'm trying to avoid adding content using Javascript, but will do as a last resort. That would be easy, but could cause maintenance issues.
I think your best bet is to add the summary to the XMLPackage you are using for your category pages. Adding the following line will allow you to add the banners to the Summary field (editable via admin):
<xsl:value-of select="aspdnsf:GetMLValue($CurrentEntityNode/Summary)" />
This snippet assumes that the parameter CurrrentEntityNode has been declared:
<xsl:param name="CurrentEntityNode" select="/root/EntityHelpers/*[name()=/root/Runtime/EntityName]//Entity[EntityID = $CurrentEntityID]" />

Determining Last page position in xsl-fo

Can we somehow determine the position of the last-page in XSL-FO?
If I want to place my footer only on the last page, then how it could be done? As Input data varies and is not static. So any number of pages can come depending on the data.
Hope, it's not too late. But anyway, for all interested people:
Create a page master
<fo:simple-page-master master-name="my-last-page">...</fo:simple-page-master>
and put your footer as a "region-after" into that master.
Add this to your repeatable-page-master-alternatives
<fo:conditional-page-master-reference page-position="last" master-reference="my-last-page"/>
This is how you could define the last page. I don`t know your structure but you can add this in a block and reference with your footer.
<fo:block id="LASTPAGE"></fo:block>

Struts 2 property not being read from properties file

After following the struts 2 web pages and numerous examples, my application still will not pick up values from the struts.properties file.
I am trying this in order to give some values a money type format:
<s:property value="getText('struts.money.format',{value})" />
My struts.properties file which is under WEB-INF/classes and therefore visible has the following single line
struts.money.format= {0,number,\u00A4##0.00}
I get the string struts.money.format printed to the screen. If I change the first parameter of the getText call, the new string I put also will get printed instead of a true lookup happening.
If I do <s:property value="value" /> I will get back a proper number. If I drop the second argument on the getText call, I would expect to get back the right hand side of the assignment in the properties file, but i get the same struts.money.format back.
I am using Tomcat 6 with Struts 2.2.1.1. Is there an additional part of the puzzle I am possibly leaving out?
So in my struts.xml file, I put this line
<constant name="struts.custom.i18n.resources" value="struts" />
It needs this to know that I am trying to use a struts.properties file. I had assumed that by default a file named struts.properties was along the chain of places to look for a constant such as this. Only if you named it something else did you need to specify that. Even though it is in WEB-INF/classes which is recommended by the Struts 2 documentation, it just simply was not looking in this file.
EDIT
For what it is worth, I also had to modify my struts text tag like so
<s:property value="getText('struts.money.format',{#java.lang.Double#valueOf(value)})" />
Actually, value should have been a BigDecimal, but it was being treated at the view level here as java.lang.String. The problem is that some of the String objects had exponential formatting (like 1.642E07 or something to that effect) and the struts formatter could not handle the exponential formatting. The valueOf eliminates this exponential fomatting