Re: [xep-support] fo:external-graphic 'src' attribute

From: Andrzej Jan Taramina (andrzej@chaeron.com)
Date: Mon Nov 10 2003 - 07:08:43 PST

  • Next message: Matt Turner: "RE: [xep-support] keep-with problem in 2 columns"

    Alexander:

    > 1. Code cited below has an excessive space character before logo.jpg

    That was just an accident when we edited the "real" URL to create the sample
    we sent you. The actual code does not have any embedded spaces.

    > 2. Relative URL may not be working because of the following: your
    > application inside Cocoon most probably receive data as a SAX
    > events stream. In this case XEP ROOT directory used to resolve all
    > relative URLs. Thus if your base directory is different, you should
    > explicitly set it either using com.renderx.xep.BASE environment
    > variable or xml:base inside your XSL FO code.

    This is not the true. Putting the relative url inside single quotes made
    lookup of relative url's work. For example:

    <fo:external-graphic width="1.75in" src="url('images/logo.jpg')"/>

    works fine and gets the graphic relative to the current Cocoon context. But
    an absolute URL still doesn't work.

    > 3. You have set 'width' property of the image, but you have not
    > specified it's content-width. If your image is big enough you can
    > get an overflow and thus an image would not appear in the resulting
    > document.

    The actual width of the image is the same as the width property, so this is
    definitely not the issue.

    And your comment on absolute URL's of the form:

     <fo:external-graphic width="1.75in"
          src="url('http://localhost/myapp/images/logo.jpg')"/>

    > 4) I suppose that's because you try to connect to the webserver running
    > on the localhost from within itself. Have you tried to format the same
    > document on the same server from the command line? You may have to use
    > external IP instead of 'localhost' or move your images to another machine to
    > solve the problem.

    That doesn't make any sense whatsoever. localhost is a perfectly valid host
    name that should be resolved to 127.0.0.1. XEP should not care what machine
    the image is located on, since Java's handling of URL's makes this totally
    transparent, unless XEP is doing something very strange internally. And if
    that is the case, I consider this a bug in XEP.

    Note that entering the absolute URL exactly as shown above in a browser on
    the local machine returns the image just fine.

    Could you please look into the XEP code that is handling the external-graphic
    src="url()" attribute? It is my belief that there is something in your code
    that shouldn't be there that is causing this.

    Thanks!

    Andrzej Jan Taramina
    Chaeron Corporation: Enterprise System Solutions
    http://www.chaeron.com

    -------------------
    (*) 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 Nov 10 2003 - 07:10:44 PST