cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From suryanarayana.mur...@tcs.com
Subject Fw: How to pass an attaribute value from a resulting transformed xml asparameter to <map:call resource="someresource">
Date Thu, 10 Mar 2005 15:45:32 GMT
<P><BR><BR>Hi, this is the step-by-step process I am following.</P><P>We
have a content management server. Users upload all the documents, reports etcto this server.
All the realted documents are stored/grouped under one documentID. </P><P>In the
intranet portal, when the users search for a particular documentID, they get some search results.
ifthe user clicks on any link it opens the summary of that document giving links to download
each attachment or all the attachments in a zip format (with name of the zip file as &lt;DocumentID_&lt;Title&gt;.zip).</P><P>we
have site map in which when the user clicks on the download button, which ends with a pattern
http://servername:port/&lt;access_to_the_document&gt;/&lt;documentID&gt;?view=download,
my pipeline in the sitemap will be invoked.</P><P>In that pipeline, I execute
&lt;map:aggregate&gt; to get the document summary xml. Then I will transform that
xml to another xml which has required format to use ZipArchiveSerialzer as shown below:</P><P><FONT
SIZE=3 STYLE=font-size:10pt>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<BR>&lt;zip:archive
xmlns:zip=&quot;http://apache.org/cocoon/zip-archive/1.0&quot; title=&quot;sometitle.zip&quot;&gt;<BR>&lt;zip:entry
name=&quot;xyz.ppt&quot; src=&quot;soemURL&quot;/&gt;<BR>&lt;zip:entry
name=&quot;abc.pdf&quot; src=&quot;someURL&quot;/&gt;<BR>&lt;/zip:archive&gt;</FONT></P><P><FONT
SIZE=3 STYLE=font-size:10pt>After getting this xml on-fly from the transformer, I will
call &lt;map:call resource=&quot;someresource&quot;&gt; . In that resource,
I call an action which sets the response.setHeader(&quot;content-disposition&quot;,&quot;attachment;filename=&quot;+myfilename);</FONT></P><P><FONT
SIZE=3 STYLE=font-size:10pt>This &quot;myfilename&quot; is supposed to be the title
attribute in the above on-fly generated &nbsp;zip-archive xml. So, now my problem is,
how can I get this title? </FONT></P><P><FONT SIZE=3 STYLE=font-size:10pt>Is
there any other way where I can send this title as parameter from my transformer?</FONT></P><P><FONT
SIZE=3 STYLE=font-size:10pt>Please guide me.</FONT></P><P><FONT SIZE=3
STYLE=font-size:10pt>Thanks &amp; Regards,</FONT></P><P><FONT
SIZE=3 STYLE=font-size:10pt>Murthy</FONT></P><P>&nbsp;<BR><FONT
SIZE=2 STYLE=font-size:9pt><B>suryanarayana.murthy@tcs.com</B></FONT><BR><FONT
SIZE=2 STYLE=font-size:9pt>03/10/2005 21:02Please respond tousers@cocoon.apache.org</FONT><BR><BR>
<FONT SIZE=2 STYLE=font-size:9pt>To</FONT> <FONT SIZE=2 STYLE=font-size:9pt>&nbsp;</FONT>
<FONT SIZE=2 STYLE=font-size:9pt>users@cocoon.apache.org</FONT><BR> <FONT
SIZE=2 STYLE=font-size:9pt>cc</FONT> &nbsp;<BR> <FONT SIZE=2 STYLE=font-size:9pt>bcc</FONT>
&nbsp;<BR> <FONT SIZE=2 STYLE=font-size:9pt>Subject</FONT> &nbsp;<FONT
SIZE=2 STYLE=font-size:9pt>How to pass an attaribute value from a resulting transformed
xml asparameter to &lt;map:call resource=&quot;someresource&quot;&gt;</FONT><BR>
&nbsp;<BR><BR></P><P><FONT SIZE=4 STYLE=font-size:12pt>Hi,</FONT><BR><FONT
SIZE=4 STYLE=font-size:12pt>In the sitemap, in a pipeline, after xsl transfomration, I
am gettign an xml file. After that I am calling &lt;map:call resource&gt; to zip the
contents using zipArchiveSerialzer. Now I am gettign the document title as an attribute to
the root element in my xml.</FONT><BR><FONT SIZE=4 STYLE=font-size:12pt>Following
is my xml which is dynamically created using XSL transformation:</FONT><BR><FONT
SIZE=4 STYLE=font-size:12pt>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</FONT><BR><FONT
SIZE=4 STYLE=font-size:12pt>&lt;zip:archive xmlns:zip=&quot;http://apache.org/cocoon/zip-archive/1.0&quot;
title=&quot;sometitle.zip&quot;&gt;</FONT><BR><FONT SIZE=4 STYLE=font-size:12pt>&lt;zip:entry
name=&quot;xyz.ppt&quot; src=&quot;soemURL&quot;/&gt;</FONT><BR><FONT
SIZE=4 STYLE=font-size:12pt>&lt;zip:entry name=&quot;abc.pdf&quot; src=&quot;someURL&quot;/&gt;</FONT><BR><FONT
SIZE=4 STYLE=font-size:12pt>&lt;/zip:archive&gt;</FONT><BR><BR><FONT
SIZE=4 STYLE=font-size:12pt>My problem is:</FONT><BR><FONT SIZE=4 STYLE=font-size:12pt>Now
how can I pass the title attibute to &lt;map:call resource=&quot;someresoource&quot;&gt;?</FONT><BR><FONT
SIZE=4 STYLE=font-size:12pt>Please help me. this is very urgent requirement for me.</FONT><BR><BR><FONT
SIZE=4 STYLE=font-size:12pt>Thanks &amp; Regards,</FONT><BR><FONT SIZE=4
STYLE=font-size:12pt>Murthy</FONT><BR><FONT SIZE=4 STYLE=font-size:12pt>ForwardSourceID:NT00004212
</FONT><BR><BR><FONT FACE="Monospace,Courier">Notice: The information
contained in this e-mail message and/or attachments to it may contain confidential or privileged
information. &nbsp; If you are not the intended recipient, any dissemination, use, review,
distribution, printing or copying of the information contained in this e-mail message and/or
attachments to it are strictly prohibited. &nbsp; If you have received this communication
in error, please notify us by reply e-mail or telephone and immediately and permanently delete
the message and any attachments. &nbsp;Thank you<BR></FONT><BR><FONT
FACE="Monospace,Courier">---------------------------------------------------------------------<BR>To
unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org</FONT><BR><FONT FACE="Monospace,Courier">For
additional commands, e-mail: users-help@cocoon.apache.org</FONT><BR><FONT COLOR=WHITE>ForwardSourceID:NT00004236
</FONT></P>
Mime
View raw message