You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2001/10/15 19:25:50 UTC
DO NOT REPLY [Bug 4171] New: -
white-space-collapse="false" does not work
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4171>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4171
white-space-collapse="false" does not work
Summary: white-space-collapse="false" does not work
Product: Fop
Version: all
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Blocker
Priority: Other
Component: pdf renderer
AssignedTo: fop-dev@xml.apache.org
ReportedBy: sander@paralleldimension.nl
When I create a FO document with <fo:inline white-space-collapse="false">
</fo:inline> I see that in my final document I can get two spaces to separate
certain items. But when I change the document to a xsl stylesheet with FO I
stops working.
Here's a style sheet in where it fails! When I chang it back to an FO document
(strip first two and last two lines from the file it works as aspected!)
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" />
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="my-page"
page-height="297mm" page-width="210mm"
margin-top="1.17cm"
margin-bottom="2.54cm"
margin-left="1.9cm"
margin-right="1.9cm">
<fo:region-body />
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-name="my-page">
<fo:flow flow-name="xsl-region-body">
<fo:block text-align="left" font-size="10pt" line-height="10pt">
This is a test.<fo:inline white-space-
collapse="false"> </fo:inline>This is anotherone!
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Re: [Bug 4171] New: - white-space-collapse="false" does not
work
Posted by "Christopher R. Maden" <cr...@maden.org>.
At 10:25 15-10-2001, bugzilla@apache.org wrote:
>When I create a FO document with <fo:inline white-space-collapse="false">
></fo:inline> I see that in my final document I can get two spaces to separate
>certain items. But when I change the document to a xsl stylesheet with FO I
>stops working.
No - it's working correctly, but there's a point about XSLT that you're
missing.
> <fo:block text-align="left" font-size="10pt"
> line-height="10pt">
> This is a test.<fo:inline white-space-
>collapse="false"> </fo:inline>This is anotherone!
> </fo:block>
XSLT has whitespace stripping rules. By default, any text node in the
stylesheet that consists entirely of whitespace is stripped, unless it is a
child of an <xsl:text> element. In this case, the content of the
<fo:inline> is only whitespace, so it is stripped. If you run this XSLT on
its own, you will see that the output document has <fo:inline
white-space-collapse="false"></fo:inline> in it.
See ยง3.4 of XSLT. In your stylesheet, do something like
<fo:inline white-space-collapse="false">
<xsl:text> </xsl:text>
</fo:inline>
-Chris
--
Christopher R. Maden, Principal Consultant, HMM Consulting Int'l, Inc.
DTDs/schemas - conversion - ebooks - publishing - Web - B2B - training
<URL: http://www.hmmci.com/ > <URL: http://crism.maden.org/consulting/ >
PGP Fingerprint: BBA6 4085 DED0 E176 D6D4 5DFC AC52 F825 AFEC 58DA
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org