[xep-support] XEP 3.6: error in the resolution of relative URLs in the resource scheme

From: Werner Donné (werner.donne@re.be)
Date: Tue Sep 16 2003 - 13:42:09 PDT

  • Next message: Wood, Ronald: "[xep-support] About "Web-Optimized""

    Hi,

    Thank you for implementing the URL feature.

    There is, however, an error when relative URLs must be resolved. I have put my
    XEP configuration in a jar and added the latter to the classpath. The
    com.renderx.xep.ROOT property is set to "resource:/", which corresponds to the
    way the jar was made. In the etc/fonts.xml file in it I have the following:

    <?xml version="1.0"?>
    <!DOCTYPE fonts
    [
       <!ENTITY local SYSTEM "fonts.local.ent">
       <!ENTITY mt SYSTEM "monotype.ent">
    ]>

    ...

    <fonts>
        &local;

    ...
    </fonts>

    The local entity reference can't be resolved. The following stack trace is produced:

    java.lang.RuntimeException: cannot parse resource:/etc/fonts.xml:
    java.net.MalformedURLException: no protocol: fonts.local.ent
             at com.renderx.fonts.Finder.init(Unknown Source)
             at com.renderx.fonts.Finder.init(Unknown Source)
             at com.renderx.xep.Driver.init(Unknown Source)
             at com.renderx.xep.Driver.init(Unknown Source)
             at be.re.tools.XEP.main(XEP.java:294)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:324)
             at be.re.tools.NetWrapper.main(NetWrapper.java:20)

    It seems to consider the system id of the "local" entity as an absolute URL. The base
    URL for resolving "fonts.local.ent" is "resource:/etc/fonts.xml". Hence, the resolution
    should yield "resource:/etc/font.local.ent". This seems to be an EntityResolver issue.

    If the entity reference is removed it works, but then I don't have my local fonts entity
    of course. The good news is anyway that there is a work-around, since one can always
    inline the entity.

    Regards,

    Werner.

    -- 
    Werner Donné  --  Re BVBA
    Engelbeekstraat 8
    B-3300 Tienen
    tel: (+32) 486 425803	e-mail: werner.donne@re.be
    -------------------
    (*) 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 Sep 16 2003 - 13:47:34 PDT