forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Williams <william...@gmail.com>
Subject Re: Re: Can locationmap be used to find PDFs?
Date Wed, 28 Sep 2005 18:28:29 GMT
On 9/28/05, greg.vaco@cox.net <greg.vaco@cox.net> wrote:
> Tim -
>
> Adding the "lm:" cause the hyperlink to be rewritten, but I wanted to pull the PDF and
make it part of my local site as in the "Retrieving an XDoc via HTTP" example - except it's
not and XDoc file, but a PDF.
>
> -- Greg
>
> >
> > From: Tim Williams <williamstw@gmail.com>
> > Date: 2005/09/28 Wed PM 01:03:50 EDT
> > To: user@forrest.apache.org
> > Subject: Re: Can locationmap be used to find PDFs?
> >
> > On 9/28/05, greg.vaco@cox.net <greg.vaco@cox.net> wrote:
> > > I'm trying to pull PDFs from an external site by using locationmap, but it
isn't working.  To test it using forrest-head's seed, I modified the locationmap by adding:
> > >
> > > <match pattern="xForrest/**.pdf">
> > >    <location src="http://forrest.apache.org/{1}.pdf"/>
> > > </match>
> > >
> > > and added this to the <about> section of site.xml:
> > >
> > > <test label="Test" href="xForrest/license.pdf" description="Test"/>
> > >
> > > However, it fails to find it.  Any thougths?

Shucks sorry.  You'll need a project sitemap entry like this:
<map:match pattern="xForrest/**.pdf">
  <map:read src="{lm:xForrest/license.pdf}" mime-type="application/pdf" />
</map:match>

Keep your site.xml and locationmap entries as you had them.

This should work but is a work-around.  What you had originally will
eventually work as we should be resolving raw content as well through
the locationmap but we're not yet.
--tim

Mime
View raw message