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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> + Use of before and after string (3) Sticky Topic
-> - How do I substitute element ty... (1)
-> + How does one add working days ... (4)
-> - Help, I have existing XLT and... (1)
-> + Need help on XSLT issue - (2)
-> + EDI to XML Conversion (7)
-> - XML To JSON Conversion using X... (1)
-> + Formatting Paragraphs to same ... (2)
-> - Grouping of records (1)
-> + Problems with xsd 1.1 (4)
-> + XML to HL7 mapping (3)
-> + XSLT 3 and Iterate (2)
-> + XSL-FO to PDF preview (3)
-> + java.lang.RuntimeException: Er... (2)
-> + Create Acroforms with Stylus X... (2)
-> + How to change XSLT parameter s... (3)
-> + how to change format of the da... (2)
-> + Search "Next 8 Results " doesn... (2)
-> - Support for Git (1)
-> + newbee (8)
-- [1-20] [21-40] [41-60] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
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).

   
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.