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

From: Alexander Peshkov (
Date: Fri Jan 23 2004 - 02:23:27 PST

  • Next message: David Cramer (Tech Pubs): "[xep-support] Problems with Japanese pdf"

    Hello Kenneth,

    From the point of view of the URI spec (RFC 2396), first URL listed
    below is not a relative, but an absolute URL since it have protocol
    (schema) explicitly defined. Note also that we relay on the Java URL
    processing mechanism. Being fed with this kind of URL, Java do not use
    standard relative URL resolution methods, but rather treat it as an
    absolute URL and applies it to the file system (as a usual path
    expression). Since this expression is, in fact, a relative path it
    will be applied with respect to the current path that is a path of the
    Java process. Therefor use of this URL form can lead to unpredictable results.
    Second URL form listed below (or an absolute URL) is much more advisable.

    KJH> (1) background-image="url(file:../graphics/smile.gif)"
    KJH> (2) background-image="url(../graphics/smile.gif)"

    KJH> Form 1 may well be wrong, but it was confusing in that it worked with
    KJH> an ant java task calling XSLDriver but failed with the ant xep task.

    It's a matter of coincidence, your URL was occasionally 'resolved'
    into the correct path using current Ant process path.

    KJH> Form 2 works with both.

    KJH> Attached is a small test case that demonstrates the above results.

    KJH> I'm happy to use form 2. I just wanted to follow-up for the benefit
    KJH> of anyone who happens across this thread with a similar problem.

    KJH> Thanks for your help, Alexander.

    KJH> Cheers,

    KJH> Ken

    Best regards,
    Alexander Peshkov

    (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    in the body of the message to from the address
    you are subscribed from.
    (*) By using the Service, you expressly agree to these Terms of Service

    This archive was generated by hypermail 2.1.5 : Fri Jan 23 2004 - 02:33:04 PST