[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

fo:inline within fo:basic-link (extra output space)

Subject: fo:inline within fo:basic-link (extra output space)
From: Khaled Aly <ka.aly@xxxxxxxxxx>
Date: Tue, 13 Nov 2007 03:34:03 +0200
 fo:inline within fo:basic-link (extra output space)
Hi

I'm re-sending this problem as I didn't re-phrase after having posted it to FO and concluded that it is either FO or FOP related.

The problem is that, as per below fragments, a fo:inline within fo:basic-link in an XSLT template, gets padded with an extra space at left and right in the resulting FO and consequently PDF output file.

- The same FO results from both FOP and XEP.

- The problem is eliminated if the space is removed manually in the FO file before transforming to PDF.

I tried adding <xsl:strip-space fo:inline> but it didn't seem to apply to a fo element.

Keeping the fo:inline within fo:basic-link is needed to provide the normal web link appearance.

Has anyone experienced this problem and/or an XSLT solution?

Many thanks for help
Khaled

-------------------------------------------------------------------------------------------

I've added the element WebLink to xsl:strip-space to overcome, but didn't work.

The source XML is:

employing <WebLink url="http://www.xml.org" <http://www.xml.org>>XML</WebLink>-based single-sourcing.


The XSLT for element WebLink:


<xsl:template match="WebLink">
<fo:basic-link>
<xsl:attribute name="external-destination"><xsl:value-of select="@url"/></xsl:attribute>
<fo:inline color="blue" text-decoration="underline"><xsl:apply-templates/></fo:inline>
</fo:basic-link>
</xsl:template>



The Saxon generated FO is:


employing <fo:basic-link external-destination="http://www.xml.org" <http://www.xml.org>> <fo:inline color="blue" text-decoration="underline">XML</fo:inline>
</fo:basic-link>-based single-sourcing



And the FOP 0.93 (and XEP 4) generated PDF is (an extra space around the term "XML"; two spaces to the left and an unintended space before the dash):


employing XML -based single-sourcing.


When the FO is edited to ensure no extra space around the <fo:inline>, the PDF comes fine:


employing XML-based single-sourcing.

-------------------------------------------------------------------------------------------------------

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.