|
top
|
 Subject: XSL-fo and how to line feed the information which is given in one field Author: Marjatta Repo Date: 30 Mar 2010 02:45 AM Originally Posted: 18 Mar 2010 02:12 AM
|
Hi,
we like to line feed information, which is in XML as follows:
One item:
<value field_id="ITP_TYOTEHT" field_name="Tehtävänimikkeet ja ajanjakso" is_visible="true" type="P" value_desc="Siivooja 01.01.2005-30.11.2009" field_desc="Sql lause MBP:stä">Siivooja 01.01.2005-30.11.2009</value>
Several items:
<value field_id="ITP_TYOTEHT" field_name="Tehtävänimikkeet ja ajanjakso" is_visible="true" type="P" value_desc="" field_desc="Sql lause MBP:stä">HR-harjoittelija 01.06.2009-21.09.2009,Apulaisassistentti 21.09.2009-29.12.2009,Assistentti 30.12.2009-31.03.2010</value>
We will get it done when where are several items as follows (solu-loop is defined separately):
<xsl:call-template name="solu-loop">
<xsl:with-param name="sisalto">
<xsl:value-of select="substring-before(value[@field_id='ITP_TYOTEHT'],',')"/>
<xsl:value-of select="$linefeed"/>
<xsl:value-of select="substring-after(value[@field_id='ITP_TYOTEHT'],',')"/>
<xsl:value-of select="$linefeed"/>
</xsl:with-param>
</xsl:call-template>
But this is not working with one item, because we do not have any comma in the end (= and the information does not appear in PDF-printout).
Could we somehow solve this using replace- funtion so that comma will be replaced with line feed. And if there is only one item and no comma we will yet get it in the printout.
Actually I do not no how to use replace - function in XSL-FO. Is it possible? Is doReplace needed to set true somewhere? I am totally confused.
ZZZZZZZZZ
30.03.2010. I am still optimisticly waiting for some advices, if somebody knew anything about this kind of problem.
We would like to get above information on PDF- printout as follows:
1)one item
Siivooja 01.01.2005-30.11.2009
2)several items
HR-harjoittelija 01.06.2009-21.09.2009
Apulaisassistentti 21.09.2009-29.12.2009
Assistentti 30.12.2009-31.03.2010
Noname(50).
Noname(51).
|
|
|