[xslV1]transform a character in newline
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 147
- Joined: Sat Oct 19, 2013 8:21 am
[xslV1]transform a character in newline
hi,
I would like to translate the # newline
I would like to get
I obtains
Why ?
Thank you
I would like to translate the # newline
Code: Select all
<xsl:value-of select="translate('1#2#3#','#','
')"/>
Code: Select all
1
2
3
Code: Select all
1 2 3
Thank you
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: [xslV1]transform a character in newline
Post by sorin_ristache »
Hello,
For the XSLT input:
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
For the XSLT input:
Code: Select all
<xsl:value-of select="translate('1#2#3#','#','
')"/>
Code: Select all
1
2
3
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
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: [xslV1]transform a character in newline
Post 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:
Regards,
Sorin
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
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service