You can start of an XSP instead of an XML
Just make sure that your XSP generates the same XML syntax as you have now.
Then you can use xsp-request to get your param.
Here's some code I use in XSP
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-request="http://apache.org/xsp/request/2.0"
create-session="true">
<zip:archive xmlns:zip="http://apache.org/cocoon/zip-archive/1.0">
<xsp:logic>
String uri = <xsp-request:get-sitemap-uri/> ;
String src ;
String name ;
src = uri.substring(12 , uri.length() - 4) + ".csv" ;
name = src.substring(5, src.length() - 4) + ".csv" ;
</xsp:logic>
<zip:entry>
<xsp:attribute
name="name"><xsp:expr>name</xsp:expr></xsp:attribute>
<xsp:attribute
name="src">cocoon:/reports/<xsp:expr>src</xsp:expr></xsp:attribute>
</zip:entry>
</zip:archive>
</xsp:page>
http://cocoon.apache.org/2.1/userdocs/logicsheets/request.html
[EMAIL PROTECTED] wrote:
Hello community,
my sitemap:
<map:match pattern="zipped.zip">
<map:generate src="zip.xml"/>
<map:parameter name="pk" value="{request-param:pk}"/>
<map:serialize type="zip"/>
</map:match>
my zip.xml
<zip:archive xmlns:zip="http://apache.org/cocoon/zip-archive/1.0
<http://apache.org/cocoon/zip-archive/1.0>">
<zip:entry name="print.pdf"
src="http://localhost:8080/cocoon/print.pdf?pk=xx">
</zip:entry>
</zip:archive>
What I want to do:
call the URL http://localhost:8080/cocoon/zipped.zip?pk=45. The
request parameter should be passed to zip.xml and be put into the src
URL of my print.pdf; so that the zip.xml looks in this case like that:
<zip:archive xmlns:zip="http://apache.org/cocoon/zip-archive/1.0">
<zip:entry name="print.pdf"
src="http://localhost:8080/cocoon/print.pdf?pk=45">
</zip:entry>
</zip:archive>
(Something like the SQLTransformer '<sql:substitute-value
sql:name="pk"/>')
How can I achieve that?
Thanks
Marco
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]