docbook-apps

  • 1.  fo:external-graphic w/ # in file name

    Posted 12-03-2008 06:55


    Hi!

    I noticed that if I have # in the file name of an external graphics
    file, fop is unable to find it. If I rename the file (and change the .fo
    file accordingly) it works.

    Here's what I have:


    <fo:external-graphic
    src="url(file:/C:/Temp/test123/m2#1_1.svg)" width="auto" height="auto"
    content-width="auto"
    content-height="auto"
    content-type="content-type:image/svg+xml"
    text-align="center"/>

    Here's the error message:

    3.12.2008 8:46:20 org.apache.fop.fo.flow.ExternalGraphic bind
    SEVERE: Image not found: file:/C:/Temp/test123/m2#1_1.svg


    The file does exist:

    C:\Temp\test123>dir m2#1_1.svg
    Volume in drive C is Local Disk
    Volume Serial Number is F8AC-6817

    Directory of C:\Temp\test123

    28.11.2008 13:29 98 080 m2#1_1.svg
    1 File(s) 98 080 bytes
    0 Dir(s) 63 134 236 672 bytes free



    Environment:

    fop 0.95
    windows xp sp2
    java 1.5.0_15




    ::Antti::






  • 2.  RE: [docbook-apps] fo:external-graphic w/ # in file name

    Posted 12-03-2008 15:47
    The pound character is a reserved character in the URL syntax and should not be used in file names. Since the value you are specifying is a URL, you need to observer the syntax of URLs.

    From the spec:

    Hash for Fragment Identifiers
    The hash ("#", ASCII 23 hex) character is reserved as a delimiter to separate the URI of an object from a fragment identifier .

    Regards,

    Larry Rowland