Page 1 of 1
[xslV1]transform a character in newline
Posted: Fri Dec 20, 2013 3:49 pm
by Le Basque
hi,
I would like to translate the # newline
Code: Select all
<xsl:value-of select="translate('1#2#3#','#','
')"/>
I would like to get
I obtains
Why ?
Thank you
Re: [xslV1]transform a character in newline
Posted: Mon Dec 23, 2013 12:53 pm
by sorin_ristache
Hello,
For the XSLT input:
Code: Select all
<xsl:value-of select="translate('1#2#3#','#','
')"/>
I get in the output:
I run the XSLT transformation and I view the result in the Oxygen application. I get the same result if the result is saved by the XSLT transformation in a .txt or .xml file or if I just view the result in an Oxygen result view (the
Show in results view option on
the Output tab).
How do you view the result of the XSLT transformation? Does the transformation create an output file? What is the ASCII code (or Unicode code) of the character that separates the numbers 1, 2, 3?
Regards,
Sorin
Re: [xslV1]transform a character in newline
Posted: Thu Jan 02, 2014 11:38 am
by Le Basque
hi,
So we can not return to the line in a PDF generation?
thank you and happy New Year
Re: [xslV1]transform a character in newline
Posted: Fri Jan 03, 2014 5:57 pm
by sorin_ristache
Hello,
If you want to create PDF output and you need to force a new line for every character '#', you can extract the substrings separated by '#' (in your case the substrings are
1,
2 and
3) and place them in separate
fo:block elements:
Code: Select all
<fo:block>1</fo:block>
<fo:block>2</fo:block>
<fo:block>3</fo:block>
Regards,
Sorin