[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Preventing extra spaces for indexterm elements with Apache FOP
Hi. I'm using Saxon 6.5.5 and Apache FOP 1.0 to produce PDF. Wherever an indexterm results in a <fo:wrapper> element, Apache FOP includes the whitespace in the <fo:block> element that surrounds the <fo:wrapper>. As suggested by earlier threads about this I made sure that I am not overriding the xsl:output element that sets indent="no" for FO. Most of my FO output is not indented, however, the <fo:wrapper> elements for indexterms are indented and the whitespace shows up in the PDF. This is apparent because most of our index entries are at the start of paragraphs and the spaces make an indent in the PDF paragraph. I tried processing the same FO file with a trial copy of RenderX XEP and the spaces do not appear. The workaround I'm using is to remove newline characters that are followed by spaces and then the start tag of the <fo:wrapper>. This seems to leave the spaces around indexterms that occur in the middle of a line of text. The workaround doesn't seem very safe to me though. <replaceregexp file="my-fo-file.xml" match="\n\s+<fo:wrapper" replace="<fo:wrapper" flags="g" encoding="utf-8" /> Why do the FO stylesheets indent <fo:wrapper> elements when the indent attribute for the <xsl:output> is set to "no"? Is there a better workaround for this problem? My searching didn't turn up a clear answer. Thanks for your help. Peter Desjardins
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]