Re: [xep-support] XEPTask: BASE for resolving contained URLs?

From: Kenneth J. Hughes (kjh@entel.com)
Date: Tue Jan 20 2004 - 10:45:27 PST

  • Next message: Chris Bowditch: "Re: [xep-support] Complex Running Headers"

    Hi Alexander, thanks for your reply.

    I agree with everything you write, yet I still am observing that XEP,
    when used via the xep ant task, is trying to resolve URLs (graphics in
    particular) relative to the location from which ant is run rather than
    relative to the location of the FO input document.

    Using an ant target such as the following,

      <target name="pdf" depends="fo">
        <xep format="PDF">
          <classpath refid="xep-classpath"/>
          <sysproperty key="com.renderx.xep.ROOT" value="${xep.dir}"/>
          <sysproperty key="com.renderx.xep.BASE" value="${base.dir}"/>
          <fileset dir="${base.dir}">
            <include name="*.fo"/>
          </fileset>
        </xep>
      </target>

    I'm seeing an error, "Failed to create image," where the message goes
    on to explain that the graphic file did not exist relative to the
    directory from which ant was run. I believe that it should be trying
    to resolve it relative to the location of the FO file in which the URL
    exists.

    Am I wrong?

    Cheers,

    Ken

    At 12:23 AM 1/20/2004, Alexander Peshkov wrote:
    >Hello Kenneth,
    >
    >XSL FO spec prescribes that relative URLs within the doc should be
    >resolved with respect to the location of the document. For the cases
    >when the source document has no systemId (i.e. it was created in
    >memory) we provide special facility - BASE property that defines basic
    >directory for such a files. As it is clearly stated in "XEP User
    >Guide", it's applicable only for the files without systemId.
    >There is another feature that allows you explicitly define base
    >directory for the URL resolution inside given FO file - it is xml:base
    >property. This property makes effect no matter if systemId is present
    >or not. Setting its value using XSLT stylesheet parameter at the
    >transformation stage proved to be quite convenient.
    >
    >Best regards,
    >Alexander Peshkov mailto:peshkov@renderx.com
    >RenderX
    >
    >KJH> I expected that setting com.renderx.xep.BASE would cause relative URL
    >KJH> references within the input file (to images, for example) to be
    >KJH> resolved relative to its value, however I'm not seeing that. It
    >KJH> appears that BASE is only being used to determine the input file
    >KJH> locations. Should it not also be used to resolve relative URLs within
    >KJH> the doc? If not, what's the proper way of telling XEP that relative
    >KJH> URLs are to be resolved with respect to the directory of the document
    >KJH> that contains the URL?
    >
    >KJH> If I forgo the xep ant task and instead set the dir attribute on a
    >KJH> java task calling XEP directly, input files and their containing
    >KJH> relative URLs do resolve successfully. However, to make that approach
    >KJH> work from ant over a directory of input files is messy and
    >KJH> inefficient; the xep ant task handles that better.
    >
    >KJH> Thanks for any answers or suggestions.
    >
    >KJH> Cheers,
    >
    >KJH> Kenneth J. Hughes kjh@entel.com
    >KJH> Entelechy Corporation http://www.entel.com/
    >
    >KJH> -------------------
    >KJH> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    >KJH> in the body of the message to majordomo@renderx.com from the address
    >KJH> you are subscribed from.
    >KJH> (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
    >
    >
    >-------------------
    >(*) 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

    -------------------
    (*) 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 : Tue Jan 20 2004 - 10:53:52 PST