forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gav...." <>
Subject RE: Match Patterns - .xmap and .locationmap.
Date Sun, 21 Jan 2007 02:25:29 GMT

> -----Original Message-----
> From: Tim Williams []
> Sent: Saturday, 20 January 2007 9:39 PM
> To:
> Subject: Re: Match Patterns - .xmap and .locationmap.


> > Questions. (from Gav)
> >
> > 1. - When a URL of /images/icon-a.png is called for as an example, it
> will
> > Fall into this match. So where and how does forrest determine where
> /images/
> > Location actually is. We have possibility of
> >
> > a> in xdocs/images
> > b> in resources/images/
> > c> in anotherLocation/images/
> >
> > The when tests check in project.images which is defaulted to
> > resources/images. If /images/icon-a.png is meant to be
> > xdocs/images/icon-a.png where is this matched ??
> take a look at the locationmap.xml file and look for the pattern
> "project.images.**.*"  this is where they actually get resolved to a
> physical location.  I don't know the rest of your questions without
> looking into it a bit to refresh myself and I haven't the time right
> now.
> --tim

Hi Tim, yep got that thanks.

    <match pattern="project.images.**.*">
        <location src="{properties:resources.images}{1}.{2}" />
        <location src="{properties:content}../resources/images/{1}.{2}" />
        <location src="{properties:content.xdocs}images/{1}.{2}" />
        <location src="{properties:content.xdocs}{1}.{2}" />

The above is working fine for .html pages etc but does not work for pdf

>From what I can tell we need to implement this same feature for the
Document-to-fo.xsl :-

        <!-- already absolute -->
        <xsl:when test="contains(string(@src),':') or
                <xsl:value-of select="@src"/>

I feel that the 'value-of select' needs the relevant location (whichever one
of the 4 above) putting in before the @src using concat. This will then make
The src a full path location and fop will be happy.

I have tried this manually by adding in the path to xdocs/images path before
@src and
The result is that any images relevant to xdocs appear in the pdf fine.
I then changed this to add the path to resources/images directory and the
Result is any images there appear fine in the pdf.

The same as for .html, we need to fall through these directories for .fo 
Until the image is found and then prepend them to the value-of path.

I have tried all sorts of things to get this to happen without success so
far , even passing a parameter from the match pattern in resources.xmap
Without success. The nearest I have come is create a value in sitemap.xmap
And values there get prepended, but still the same problem, I don't know
How to pass the correct directory across from the locationmap.

Once this is done, the missing SVG images are I think a separate problem
But we'll see.

Any more pointers appreciated.


View raw message