Verwer, Nico wrote:
Dear subscribers,

I have a question concerning variable substitution.
In my sitemap I define a global variable:

    <map:component-configurations>
      <global-variables>
        <base>myDirectory</base>
      </global-variables>
    </map:component-configurations>

Now I try to use this within the RealPathModule, like:

      <map:match pattern="getFile/**">
        <map:generate type="file" src="file://{realpath:{global:base}/subdir}/{1}"/>
      ...

(Note: This is simplified. I have to do this because I am using the jar: protocol followed by file://etcetera.)

This does not work; The {global:base} is not expanded, and Cocoon looks for 
"file:/<real-path-prefix>/{global:base/subdir}/my-file.xml" ({1} is myfile.xml).
Apparently, variable substitution cannot be nested, and substitution looks for the 
first '}' after the '{'.
Is there another way to do this?

there's an InputModuleAction that can be used to feed variables or results from other modules into a - surprise - input module and return the result as new sitemap variable. see javadocs for usage.


Christian

--
C h r i s t i a n       H a u l
[EMAIL PROTECTED]
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


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



Reply via email to