forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: 'broken link' causes..
Date Mon, 04 Nov 2002 15:15:05 GMT

Rodent of Unusual Size wrote:
> * On 2002-11-04 at 09:46,
>   Jeff Turner <jefft@apache.org> excited the electrons to say:
> 
>>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
> 
> 
> thank you for the expanded explanation; i feel much less baffled now.
> 
> am i off the wall, or would it be reasonable for *all* such rules to
> at least check to see whether the transformation needs to be done
> before trying it?  i don't know from xsl, but pseudo-code:
> 
> <map:match pattern="**.pdf">
>     <if -e "content/xdocs/{1}.pdf">
>         <copy file>
>     <else>
>         <map:generate src="content/xdocs/{1}.xml"/>
>         <map:transform
>         src="skins/{defaults:skin}/xslt/fo/document2fo.xsl"/>
>         <map:serialize type="fo2pdf"/>
>     </if>
> </map:match>

Yup, this has been discussed recently, but basically it introduces a 
non-linear correspondence between the input and the output URI spaces, 
as you have also asked.

For istance, is I have a stuff.pdf and a stuff.xml, and I ask for 
stuff.pdf, I only get one of the two files, depending on which comes 
first in the sitemap rules.

Jeff, do you remember what conclusion we came to?
These weeks have been so hectic I forgot :-S

> i notice another problematic thing about the transformation rule: it
> assumes the source is under content/xdocs/ -- which doesn't work in my
> case, because the source pdf is in resources/forms/ instead.

Hmmm... this is about the outer-resources "mounting" and linkmap we 
talked about too... gotta finalize...

> i have fallen afoul of the mismatch of structure between the input and
> output tree, as i saw discussed last night.

We should fix this.

> am i trying to warp forrest to do things is isn't designed/intended to
> do, or are my comments useful and maybe can help improve things? 

You rock, man, you've given us more useful feedback in three days than 
others in three months! :-)

> i've
> jumped right in because of some things nicola said, so perhaps my
> expectations are mis-set..

Exactly what we need: to understand what expectations of the users are 
and meet them with the least possible mismatch.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Mime
View raw message