not sure abt the syntax but u can follow following approach,
try to store 2nd param in a parameter and then use it wherevr u need

<map:match pattern="**/showpdf-*.pdf">
<map:parameter name="filename" value="{2}"/>

<map:act type="validate">
<map:select type="parameter">
<map:parameter name="parameter-selector-test" value="{check}"/>
<map:when test="success">

<map:read src="{[filename parameter]}.pdf" mime-type="application/pdf" />


</map:when>
<map:otherwise>
<map:generate src="test.xml"/>
<map:transform src="test.xsl"/>
<map:serialize type="xml"/>
</map:otherwise>
</map:select>
</map:act>
</map:match>

On Mon, Apr 4, 2011 at 2:42 PM, Gaurav Kalia <gaurav.ka...@techblue.co.uk>wrote:

> Hi All
>
> I need to read a PDF file using read src.
>
> The below match patter works fine.
>
> <map:match pattern="**/showpdf-*.pdf">
> <map:read src="{2}.pdf" mime-type="application/pdf" />
> </map:match>
>
> Now i need to validate some session param before displaying the PDF and
> according to the result i need to display PDF. Below is the modified
> pipeline
>
> <map:match pattern="**/showpdf-*.pdf">
> <map:act type="validate">
> <map:select type="parameter">
> <map:parameter name="parameter-selector-test" value="{check}"/>
> <map:when test="success">
> <map:read src="{2}.pdf" mime-type="application/pdf" />
> </map:when>
> <map:otherwise>
> <map:generate src="test.xml"/>
> <map:transform src="test.xsl"/>
> <map:serialize type="xml"/>
> </map:otherwise>
> </map:select>
> </map:act>
> </map:match>
>
> But in the above example i am not getting the {2} param which is the name
> of the PDF.
>
> Please suggest if this is not the right way to do this.
>
> TIA
>
> Regards
> Gaurav
>
> --
> Gaurav
> Web Development
> Techblue Softwares&  Technology Blueprint Ltd
>
> T : 08450047142 Extn: 5102
> E : gaurav.ka...@techblue.co.uk
> W : www.techblue.co.in
>    www.technologyblueprint.co.uk
>
> Confidentiality Notice
>
> The contents of this email are confidential and may be privileged, and
> are intended only for the use of the person or company named herein. Any
> views or opinions presented are solely those of the author and do not
> necessarily represent those of Techblue software or Technology Blueprint
> Limited.
>
> If you are not the intended recipient of this email or a person
> responsible for delivering it to the intended recipient, you are hereby
> notified that any distribution, copying or dissemination of the
> information herein is strictly prohibited.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@lenya.apache.org
> For additional commands, e-mail: user-h...@lenya.apache.org
>
>


-- 
*Thanks with regards
*+919582723100
*Bhavya Sharma*
        निष्काम

Reply via email to