You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ron Surratt <rs...@mcn.org> on 2002/05/11 23:44:13 UTC
using request parameters in sitemap
Hi,
I am trying to use the directory generator and having some difficulty. I can't get the depth to work (I did check the archives and bug reports with no luck). I looked at the code in DirectoryGenerator.java and it looks like it should work but it doesn't so I gave up and tried a different tack, I
created:
<map:match pattern="dirtest1a/**">
<map:generate type="directory" src="{1}" depth="10"/>
<map:serialize type="xml"/>
</map:match>
and then I call this (recursively) from a stylesheet with document(). All that works fine BUT... I can only get the directories underneath my sub-sitemap. What I want is to pass the directory I want to dirtest1a as a request parameter (e.g.:
http://localhost:8080/coccoon/testdir/dirtest1a?dir=c:/tomcat4.01/...) so I can get the listing of ANY directory, and then give this to src="", but I don't know how or even if it is possible (or even a good thing to do if it is possible). I have a feeling this is a real basic question but I am
pretty new to cocoon and I couildn't find an answer in the docs and am at a loss on how to solve the problem. (Or maybe someone has a total different solution that is better)
Thanks,
Ron
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: using request parameters in sitemap
Posted by Ron Surratt <rs...@mcn.org>.
sorry - never mind - I found the answer in the equest-parameter generator:
<map:match pattern="dirtest1b">
<map:match pattern="dir" type="request-parameter">
<map:generate type="directory" src="{1}" depth="2"/>
<map:serialize type="xml"/>
</map:match>
</map:match>
now it works with stuff like:
http://localhost:8080/cocoon/testdir/dirtest1b?dir=j:/jakarta-tomcat-4.0.1/webapps/cocoon/testdir/examples
just fine, even from withing document() :)
Ron
>
> Hi,
>
> I am trying to use the directory generator and having some difficulty. I can't get the depth to work (I did check the archives and bug reports with no luck). I looked at the code in DirectoryGenerator.java and it looks like it should work but it doesn't so I gave up and tried a different tack, I
> created:
>
> <map:match pattern="dirtest1a/**">
> <map:generate type="directory" src="{1}" depth="10"/>
> <map:serialize type="xml"/>
> </map:match>
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>