no line wrap please
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 3
- Joined: Mon Mar 14, 2005 1:45 am
no line wrap please
Hi,
I have a problem with the following piece of code:
<fo:block ???>
Name: <xsl:value-of select="name"/>,
Age: <xsl:value-of select="age"/>,
City: <xsl:value-of select="city"/>
</fo:block>
FOP creates the document with a line break after the age value - but there ist still enough room, so that no break is actually needed there.
The representation in the document I want is just a single row:
Name: xxx, Age: xxx, City: xxx
what attribute ??? and what attribute-value do I have to set, that it works as I want?
Thanks for help!
I have a problem with the following piece of code:
<fo:block ???>
Name: <xsl:value-of select="name"/>,
Age: <xsl:value-of select="age"/>,
City: <xsl:value-of select="city"/>
</fo:block>
FOP creates the document with a line break after the age value - but there ist still enough room, so that no break is actually needed there.
The representation in the document I want is just a single row:
Name: xxx, Age: xxx, City: xxx
what attribute ??? and what attribute-value do I have to set, that it works as I want?
Thanks for help!
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
Probably the value of the page-width attribute of the FO page master element that includes your FO block is too small. Or the font size is too large. This is a simple FO document that sets the page width and height for the North American Letter format (8.5in x 11in) and displays your text without breaking the line. You can set any values you need for the attributes page-width and page-height. If you need a smaller page width and the line breaks you can set a smaller font size, for example add the attribute font-size="8pt"to the fo:block element.
Regards,
Sorin
Probably the value of the page-width attribute of the FO page master element that includes your FO block is too small. Or the font size is too large. This is a simple FO document that sets the page width and height for the North American Letter format (8.5in x 11in) and displays your text without breaking the line. You can set any values you need for the attributes page-width and page-height. If you need a smaller page width and the line breaks you can set a smaller font size, for example add the attribute font-size="8pt"to the fo:block element.
Code: Select all
<?xml version="1.0"?>
<fo:root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="page1" page-width="8.5in"
page-height="11in" margin-top="0.5in" margin-bottom="0.5in"
margin-left="1in" margin-right="1in">
<fo:region-body margin="1in"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="rest-of-pages" page-width="8.5in"
page-height="11in" margin-top="0.5in" margin-bottom="0.5in"
margin-left="1in" margin-right="1in">
<fo:region-body margin="1in"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="my-sequence">
<fo:single-page-master-reference master-reference="page1"/>
<fo:repeatable-page-master-reference master-reference="rest-of-pages"/>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="my-sequence">
<fo:flow flow-name="xsl-region-body">
<fo:block>Name: name-here ,
Age: age-here,
City: name-of-city-here
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
Sorin
-
- Posts: 3
- Joined: Mon Mar 14, 2005 1:45 am
-
- Posts: 5
- Joined: Wed Jan 05, 2005 1:07 pm
hi,
try to write everything in one line and use a  :
<fo:block>Name: <xsl:value-of select="name"/>,Age: <xsl:value-of select="age"/>,City: <xsl:value-of select="city"/></fo:block>
or maybe try to use fo:inline instead of fo:block, a fo:block always forces a line break, anyhow why do you have to change your code and add all the fo:blocks?
try to write everything in one line and use a  :
<fo:block>Name: <xsl:value-of select="name"/>,Age: <xsl:value-of select="age"/>,City: <xsl:value-of select="city"/></fo:block>
or maybe try to use fo:inline instead of fo:block, a fo:block always forces a line break, anyhow why do you have to change your code and add all the fo:blocks?
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