You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by pe...@donovandata.com on 2004/11/19 18:39:01 UTC
sitemap variables
This is probably very easy to do; I just don't know how. In my
sitemap.xmap file I want to parameterize a portion of the src value.
So instead of this:
<map:generate type="file"
src="/mnt/w2kshare/internal/techlib/sitemap.xml"/>
I would like to have this:
<map:generate type="file" src="{mymountpoint}/sitemap.xml"/>
I've seen this done in sitemaps. I just don't know how to set the
parameter, or how to find doc telling me how (I have looked). Can someone
tell me know to do this?
Thank you!
Re: sitemap variables
Posted by Jens Maukisch <co...@maukisch.net>.
Hi,
> So instead of this:
> <map:generate
> type="file"src="/mnt/w2kshare/internal/techlib/sitemap.xml"/>
> I would like to have this:
> <map:generate type="file"src="{mymountpoint}/sitemap.xml"/>
>
Maybe you are searching for the GlobalInputModule: http://wiki.apache.org/cocoon/InputModules
<map:pipelines>
<map:component-configurations>
<global-variables>
<foo>bar</foo>
</global-variables>
</map:component-configurations>
<map:pipeline>
<map:match pattern="foobar">
<map:generate src="{global:foo}/my.xml"/>
....
hth
--
* best regards
* Jens Maukisch
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: sitemap variables
Posted by Leszek Gawron <lg...@mobilebox.pl>.
peter.dykstra@donovandata.com wrote:
>
> This is probably very easy to do; I just don't know how. In my
> sitemap.xmap file I want to parameterize a portion of the src value.
>
> So instead of this:
>
> <map:generate type="file"
> src="/mnt/w2kshare/internal/techlib/sitemap.xml"/>
>
> I would like to have this:
>
> <map:generate type="file" src="{mymountpoint}/sitemap.xml"/>
>
> I've seen this done in sitemaps. I just don't know how to set the
> parameter, or how to find doc telling me how (I have looked). Can
> someone tell me know to do this?
>
> Thank you!
Depends on where you get the parameter value from. What is your use
case? If you just want to use some kind of root folder you do it like this :
<map:pipelines>
<map:component-configurations>
<global-variables>
<baseURL>/mnt/w2kshare/internal/techlib</baseURL>
</global-variables>
</map:component-configurations>
<.../>
<map:generate src="{global:baseURL}/sitemap.xml"/>
<.../>
--
Leszek Gawron lgawron@mobilebox.pl
Project Manager MobileBox sp. z o.o.
+48 (61) 855 06 67 http://www.mobilebox.pl
mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: sitemap variables
Posted by Upayavira <uv...@upaya.co.uk>.
Leszek Gawron wrote:
> Upayavira wrote:
>
>> peter.dykstra@donovandata.com wrote:
>>
>>>
>>> This is probably very easy to do; I just don't know how. In my
>>> sitemap.xmap file I want to parameterize a portion of the src value.
>>>
>>> So instead of this:
>>>
>>> <map:generate type="file"
>>> src="/mnt/w2kshare/internal/techlib/sitemap.xml"/>
>>>
>>> I would like to have this:
>>>
>>> <map:generate type="file" src="{mymountpoint}/sitemap.xml"/>
>>>
>>> I've seen this done in sitemaps. I just don't know how to set the
>>> parameter, or how to find doc telling me how (I have looked). Can
>>> someone tell me know to do this? Thank you!
>>
>>
>>
>> Set a global variable, at the top of the pipelines section of your
>> sitemap. See the root sitemap for an example, then use
>> {global:mymountpoint} to get at it.
>>
>> Regards, Upayavira
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
> Looks like I was 2 answers late. This just proves how good cocoon
> support is (even at 22:29 CET) :)
>
But your answer was fuller. I was lazy and just gave him pointers :-)
Regards, Upayavira
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: sitemap variables
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Upayavira wrote:
> peter.dykstra@donovandata.com wrote:
>
>>
>> This is probably very easy to do; I just don't know how. In my
>> sitemap.xmap file I want to parameterize a portion of the src value.
>>
>> So instead of this:
>>
>> <map:generate type="file"
>> src="/mnt/w2kshare/internal/techlib/sitemap.xml"/>
>>
>> I would like to have this:
>>
>> <map:generate type="file" src="{mymountpoint}/sitemap.xml"/>
>>
>> I've seen this done in sitemaps. I just don't know how to set the
>> parameter, or how to find doc telling me how (I have looked). Can
>> someone tell me know to do this?
>> Thank you!
>
>
> Set a global variable, at the top of the pipelines section of your
> sitemap. See the root sitemap for an example, then use
> {global:mymountpoint} to get at it.
>
> Regards, Upayavira
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
Looks like I was 2 answers late. This just proves how good cocoon
support is (even at 22:29 CET) :)
--
Leszek Gawron lgawron@mobilebox.pl
Project Manager MobileBox sp. z o.o.
+48 (61) 855 06 67 http://www.mobilebox.pl
mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: sitemap variables
Posted by Upayavira <uv...@upaya.co.uk>.
peter.dykstra@donovandata.com wrote:
>
> This is probably very easy to do; I just don't know how. In my
> sitemap.xmap file I want to parameterize a portion of the src value.
>
> So instead of this:
>
> <map:generate type="file"
> src="/mnt/w2kshare/internal/techlib/sitemap.xml"/>
>
> I would like to have this:
>
> <map:generate type="file" src="{mymountpoint}/sitemap.xml"/>
>
> I've seen this done in sitemaps. I just don't know how to set the
> parameter, or how to find doc telling me how (I have looked). Can
> someone tell me know to do this?
>
> Thank you!
Set a global variable, at the top of the pipelines section of your
sitemap. See the root sitemap for an example, then use
{global:mymountpoint} to get at it.
Regards, Upayavira
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org