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)
-> + XML to XML Transformation (3)
-> + This XSLT has stumped me.. (2)
-> + converting XML to EACOM format (2)
-> + Stylus with XSLT 1.0 + EXSLT T... (2)
-> + Xslt Mapper (2)
-> - xml to xsl (1)
-> - creating a website (1)
-> - XML to PDF using XML Publisher... (1)
-> - Replace nodes (1)
-> - New to XSLT, need help with a ... (1)
-> - Modify XSLT - Have List of Cha... (1)
-> - Replace nodes in one xml file ... (1)
-> - Alternate Row Colour (1)
-> - convert text to XML and then m... (1)
-> - CDATA to XML - work with trans... (1)
-> - XSL-fo and how to line feed th... (1)
-> + Houston we have a problem (2)
-> + XSL-FO PDF generation (2)
-> + StylusStudio - pick XSLT 1.0 b... (6)
-> - Stylus Studio 2010 debugging f... (1)
-- Previous [181-200] [201-220] [221-240] 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.