XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Posttop
Marjatta RepoSubject: 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


UnknownNoname(50).


UnknownNoname(51).

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.