cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mustafa Ali, Halgurt" <Mustafa...@docomolab-euro.com>
Subject File existence
Date Wed, 17 Sep 2003 09:00:22 GMT
Hi,
 
I had a Problem yesterday and asked for help, I try it now again, is the pipeline below correct
or not? I am getting an Error: 
"Invalid pattern '{request-parameter}:ID² 
 
What is a better way to check if a file exists or not? I am getting the file name from a request
parameter.
 
 
 <map:pipeline>
  <map:match pattern="handling">
   <map:select type="resource-exists">
    <map:when test="{request-param:ID}.xml">
     <map:generate type="file" src="default.xml" />
     <map:transform type="xslt" src="form2data.xsl">
       <map:parameter name="use-request-parameters" value="true" />
     </map:transform>
     <map:transform type="write-source">
     <map:parameter name="use-request-parameters" value="true" />
     </map:transform>
     <map:transform type="xslt" src="form2html.xsl" mime-type="text/xml">
       <map:parameter name="use-request-parameters" value="true" />
     </map:transform>
    </map:when>
    <map:otherwise>
     <map:generate type="file" src="default.xml" />
     <map:transform type="xslt" src="form3data.xsl" />
    </map:otherwise>
    </map:select>  
   <map:serialize type="html" />
  </map:match>
  </map:pipeline>
 
 Am I doing something wrong?
 
 Many thanks,
 Halgurt
 

Mime
View raw message