[xep-support] XEP/XML - Newline chars being eaten and logo not scaling

From: Daniel King (D.King@mdl.com)
Date: Mon Aug 25 2003 - 16:08:38 PDT

  • Next message: Alexander Peshkov: "Re: [xep-support] XEP/XML - Newline chars being eaten and logo not scaling"

    Currently I am using JDK 1.3.1 with XEP 3.54. The system I am working on
    creates some dynamic XML and pushes it off to XEP to transform to PDF using
    an XSL sheet. We were using JDK 1.3.1 with XEP 2.78. Due to the newer
    version changing the API, I had to rewrite the code that called up XEP and
    transformed the XML document. I am having two problems that I didn't have
    in the previous version. Newline characters are being eaten and a logo at
    the top of the page isn't scaling properly. Since the logo isn't scaling
    properly everytime sometimes it appears and sometimes it doesn't. The XSL
    sheet hasn't been changed at all. The code that I changed to work with the
    new version of XEP shouldn't have affected the output at all. Therefore I
    am wondering why the older version didn't eat newline characters and the
    newer version does. I compared the .FO file that is generated to the
    previous version and the latest version and nothing was different. The XML
    generated is also the same. As far as the logo goes here are code snippets:

      <fo:block-container height="3.3cm" top="0.5cm" left="1.35cm" padding="0pt"
          <xsl:apply-templates select="Logo"/>

      <xsl:template match="Logo">
        <fo:block text-align="start">
          <fo:external-graphic content-height="3.19cm" scaling="uniform">
            <xsl:attribute name="src"><xsl:value-of select="concat('file:///',
    I even tried changing the last code snippet to this since with the above
    code the logo wouldn't appear at all. Now it appears sometimes and
    sometimes it doesn't. The graphics are all different sizes. And therefore
    I need to be able to scale them to fit in this one block that is absolute.

     <xsl:template match="Logo">
        <fo:block text-align="start">
          <fo:external-graphic content-width="scale-to-fit" width="100%"
    content-height="100%" scaling="uniform">
            <xsl:attribute name="src">url('<xsl:value-of
    select="concat('file:///', @AbsolutePath)"/>')</xsl:attribute>

    Example of newline chars being eaten:

    Old code:

     Thanks for ordering our product.

     We appreciate your business.

    New code:

      Thanks for ordering our product.
      We appreciate your business.

    If any other information would be helpful to include then please let me
    know. I'm definitely befuddled as to what the deal is. I've tried to even
    add <xsl:text>&#xA;</xsl:text> to put a newline character at the end of
    every paragraph.

    Daniel W King
    Scientific Programmer II
    MDL Information Systems, Inc.
    (615) 366-2000x5114

    (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    in the body of the message to majordomo@renderx.com from the address
    you are subscribed from.
    (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html

    This archive was generated by hypermail 2.1.5 : Mon Aug 25 2003 - 16:11:12 PDT