cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathias Reem <m.r...@gmx.net>
Subject Re: Checking if resource "type" exists
Date Thu, 19 Mar 2009 00:06:54 GMT
Hi

> 1 - I could compile the class you send to me. 2 - Now I donĀ“t
> understand how can I send the parameter to which. I try in the
> block-servlet-service.xml of one of my blocks

The ResourceExistsSelector must be used in your sitemap.xmap. Have a
look at http://cocoon.apache.org/2.1/userdocs/resourceexists-selector.html


> I don`t know how can I use your code. Please can you tell me?

When you take the example, just replace the
src="org....selection.ResourceExistsSelector" to the class location
where you put my ResourceExistsSelector.

If you don't modify the example any further, you will get the same
behaviour, but instead of:

...
<map:match pattern="**.html">
  <map:select type="resource-exists">
    <map:when test="content/{1}.xml">
...

You can no be be more explicit, for example:

...
<map:match pattern="**.html">
  <map:select type="resource-exists">
    <map:parameter name="type" value="file"/>
    <map:when test="content/{1}.xml">
...

cu
	Mathias

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message