Have you tried the session transformer?  I think it might be able to do what you 
want...
Here's a sample:

sitemap stuff:
<!-- General pattern for most everything else -->
  <map:match pattern="*">
    <map:generate src="content/xml/{1}.xml"/> 
    <!-- session transformer to do variable substitution -->
    <map:transform type="session"/>             
    <map:serialize/>
  </map:match>

xml source stuff:
  <?xml version="1.0"?>

  <html xmlns:session="http://apache.org/cocoon/session/1.0";>
  <head><title>Page Title</title></head>
  <body>
  <h1>Test data from "authentication" context: 
    <!-- tag that the session transformer will resolve into data -->
    <session:getxml context="authentication" path="*/data/rlname"/>
  </h1>
  </body>
  </html>

In this case the information is in the "authentication" context which I filled in when 
teh user logged on.  I'm pretty sure you can specify the "rqeuest" context.  The path 
is just an xpath expression for the variable you want to substitute.  You might need 
to write an intemediary XSLT to convert your placeholders into the <session:getxml> 
tags, depending on what your needs are.

Hope this helps,
Chris
  


> -----Original Message-----
> From: Jorg Heymans [SMTP:[EMAIL PROTECTED]
> Sent: Wednesday, August 06, 2003 8:51 AM
> To:   '[EMAIL PROTECTED]'
> Subject:      RE: xinclude - cinclude - map:aggregate ??
> 
> Ooowwwwkay, looking at the wiki this does not seem possible (unless it's an
> undocumented feature). The src attribute of map:part does not seem to give
> access to the requestgenerator in some way or another
> 
> 
> I'll rephrase my problem then, maybe there is something more fundamental
> wrong with my logic.
> 
> 1)I have an xml file
> 2)This xml file has placeholders that need to arbitrary replaced with
> request parameters. Eg invoking url myfile.xml?placeholder1=myvaluehere
> outputs the xml document with every occurrence of placeholder1 replaced with
> "myvaluehere".
> 3)unlimited amount of placeholders can be defined, this results in an
> arbitrary amount of requestparameters, hence I really need to be able query
> the requestobject and loop over them.
> 
> 
> Hope this clarifies my problem a bit. Should I approach this differently?
> 
> Jorg
> 
> -----Original Message-----
> From: Jorg Heymans [mailto:[EMAIL PROTECTED] 
> Sent: Mittwoch, 6. August 2003 14:12
> To: '[EMAIL PROTECTED]'
> Subject: xinclude - cinclude - map:aggregate ??
> 
> Hi list,
>  
> I want to iterate over the requestparameter variables in my stylesheet.
> Following won't work
>  
>     <map:match pattern="*.smil">
>             <map:generate src="{1}.smil" />
>             <map:transform src="stylesheets/replace.xsl" >
>                         <map:parameter name="use-request-parameters"
> value="true"/>
>             </map:transform>
>             <map:serialize type="smil"/>
>     </map:match>
>  
> Is the map:aggregate or xinclude functionality the thing I'm looking for?
> How would I reference the request object as a source then?
>  
> <map:aggregate element="smil">
>      <map:part src="resource://="{1}.smil" />
>      <map:part src="cocoon://request" />
> </map:aggregate>
>  
> this didn't bring what I was looking for..
>  
> Normally I would do map:generate type="request" and then transform from
> there on, but I need to keep the Smil file as the starting point here.
>  
> Any thoughts?
> Jorg
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to