forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: 'broken link' causes..
Date Mon, 04 Nov 2002 15:53:57 GMT
On Tue, Nov 05, 2002 at 02:42:12AM +1100, Jeff Turner wrote:
> On Tue, Nov 05, 2002 at 01:23:21AM +1100, Jeff Turner wrote:
> > On Mon, Nov 04, 2002 at 06:35:11AM -0500, Rodent of Unusual Size wrote:
> > The Forrest sitemap is in xml-forrest/src/resources/conf/sitemap.xmap:
> > 
> > http://cvs.apache.org/viewcvs.cgi/xml-forrest/src/resources/conf/sitemap.xmap?rev=HEAD&content-type=text/vnd.viewcvs-markup
> > 
> > A full description of it is at:
> > 
> > http://xml.apache.org/cocoon/userdocs/concepts/sitemap.html
> > 
> > The sitemap is like a switchboard for incoming requests.  The problem in
> > incubator-site is that you've got this link:
> > 
> >   <link href="forms/ASF_Contributor_License_2_form.pdf"
> > 
> > Which matches this sitemap rule:
> > 
> > <map:match pattern="**.pdf">
> >     <map:generate src="content/xdocs/{1}.xml"/>
> >     <map:transform
> >     src="skins/{defaults:skin}/xslt/fo/document2fo.xsl"/>
> >     <map:serialize type="fo2pdf"/>
> > </map:match>
> > 
> > which tries to generate a PDF from
> > content/xdocs/forms/ASF_Contributor_License_2_form.xml
> 
> Continuing on from this..
> 
> The solution is to add a custom sitemap rule for "forms/*.pdf", and put
> it before the more general "**.pdf" rule ('**' matches subdirectories).
> 
> So, to fix incubator-site:
> 
> - Update your xml-forrest (I've just added a fix to enable this stuff)
> - Run './build.sh' to regen the shbat distribution
> - Copy xml-forrest/src/resources/conf/sitemap.xmap to
>   incubator-site/src/documentation.

Correction:
  incubator-site/src/documentation/sitemap.xmap.


> - Edit incubator-site/src/documentation, and add the following sitemap
> rule before the "**.pdf" one listed above:

Again, should be incubator-site/src/documentation/sitemap.xmap

> <map:match pattern="forms/**.pdf">
>   <map:read src="content/forms/{1}.pdf" mime-type="application/pdf"/>
> </map:match>
> 
> - Move incubator-site/src/documentation/resources/forms to
>   src/documentation/content/forms

While I'm clarifying.. what's the difference between a 'resource' and
'content'?  I'm not too sure.. I think 'resources' are things like XSLT
stylesheets.  Not something served up to the user, whereas 'content' is.
By that rule, images should be in content/, not resources/.

What do people think about changing that?


--Jeff

Mime
View raw message