forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: Indirect linking and request parameters
Date Wed, 07 Jan 2004 21:44:43 GMT
Justus H. Piater wrote:

>Upayavira <uv@upaya.co.uk> wrote on Wed, 07 Jan 2004 10:36:47 +0000:
>
>  
>
>>Justus H. Piater wrote:
>>    
>>
>>>I'm building a site where some pages rely on request parameters
>>>("file.html?parameter=value"), using XSP. All links are known at build
>>>time, so I can in principle build a static site.
>>>...
>>> PROBLEM 1: The corresponding links in the statically-built pages are
>>>            not rewritten appropriately. They still point to
>>>            "file.html?parameter=value".
>>>
>>>      
>>>
>>Do you use 'link view' or 'link gathering'? Look at the top level
>>attributes in your cli.xconf file. The URLs should be rewritten - it
>>is the same code that converts a filename as converts links, so that
>>is strange.
>>    
>>
>
><cocoon verbose="true"  
>        follow-links="true" 
>        precompile-only="false" 
>        confirm-extensions="false">
>
>Not sure what this means; I did not fiddle with link rewriting.
>
>  
>
>>>- PROBLEM 3: I'd rather use indirect links, but there's apparently no
>>>            way to include request parameters.
>>>
>>>      
>>>
>>What is an indirect link?
>>    
>>
>
><link href="site:file"> (terminology from
>http://xml.apache.org/forrest/linking.html)
>
>I'm not an XPath expert, but it seems to me that there is no way to
>include request parameters in XPath expressions, and that in fact the
>whole concept does not fit the XPath philosophy that presupposes
>static, pre-existing XML structures. Finally, it seems that there is
>currently no canonical syntax for referring to dynamically generated,
>parameterized XML, though I don't see anything wrong with such a
>concept.
>
>So, I guess that a pragmatic solution is to stick with direct linking
>for now. For a cleaner solution, use a Generator instead of XSP files
>that take parameters. Ideally though, I think that indirect linking
>should support request parameters.
>
>What does the community think?
>  
>
To this day, I still haven't downloaded Forrest (don't actually need it).

But, working in an offline mode, I do think it better to avoid request 
parameters. Cocoon is just as able to extract values from the actual URL 
as it is from request parameters, and you get a more natural filenames, 
as no mungling is required.

Regards, Upayavira



Mime
View raw message