You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Arsen A. Gutsal" <ar...@softsky.com.ua> on 2005/05/04 12:25:23 UTC

accessing flow document from sitemap

How can I access flow document within the sitemap?
Let say I have 
<generate src="somefile.xml">
<map:select type="parameter-selector-test">
<map:when test="{somefile/error}">
	<!-- this should be called when somefile.xml has /error tag -->
</map:when>
....

Is that possible?
-- 
Arsen A. Gutsal 
http://www.softsky.biz


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


Re: accessing flow document from sitemap

Posted by "Arsen A. Gutsal" <ar...@softsky.com.ua>.
Well, I have generator which generate 
<status>
<success/>
</status>
on success
and
<status>
<error>error Message</error>
</status> 
on error.

I can't set session variables in this generator or do something else.

My question was. HOW TO ACCESS document produced by generator from
sitemap using selector or matcher and perform some actions if success
was generated or do not perform if error was.

On Wed, 2005-05-04 at 22:31 +0100, Ben Pope wrote:
> Arsen A. Gutsal wrote:
> > How can I access flow document within the sitemap?
> > Let say I have 
> > <generate src="somefile.xml">
> > <map:select type="parameter-selector-test">
> > <map:when test="{somefile/error}">
> > 	<!-- this should be called when somefile.xml has /error tag -->
> > </map:when>
> > ....
> > 
> > Is that possible?
> 
> It sounds to me like you should be putting your variations into a transformer.
> 
> Perhaps this might help:
> http://cocoon.apache.org/2.1/userdocs/generators/xpathdirectory-generator.html
> 
> Please explain a little more your use-case.
> 
> Ben
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
-- 
Sincerely,
Arsen A. Gutsal
SOFTSKY Ltd CEO/Executive
SOFTSKY - Cost effective Software Development


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


Re: accessing flow document from sitemap

Posted by Ben Pope <be...@gmail.com>.
Arsen A. Gutsal wrote:
> How can I access flow document within the sitemap?
> Let say I have 
> <generate src="somefile.xml">
> <map:select type="parameter-selector-test">
> <map:when test="{somefile/error}">
> 	<!-- this should be called when somefile.xml has /error tag -->
> </map:when>
> ....
> 
> Is that possible?

It sounds to me like you should be putting your variations into a transformer.

Perhaps this might help:
http://cocoon.apache.org/2.1/userdocs/generators/xpathdirectory-generator.html

Please explain a little more your use-case.

Ben

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


Re: accessing flow document from sitemap

Posted by "Arsen A. Gutsal" <ar...@softsky.com.ua>.
Peter
On Wed, 2005-05-04 at 19:42 +0000, Peter Kröpfl wrote:
> Arsen A. Gutsal <arsen <at> softsky.com.ua> writes:
> 
> > 
> > How can I access flow document within the sitemap?
> > Let say I have 
> > <generate src="somefile.xml">
> > <map:select type="parameter-selector-test">
> > <map:when test="{somefile/error}">
> > 	<!-- this should be called when somefile.xml has /error tag -->
> > </map:when>
> > ....
> > 
> > Is that possible?
> 
> I guess you might be looking for this:
> 
> <map:call function="someFlowFunction" />
No, :) I'm looking exactly for conditional execution of sitemap based on
flow document... 
> 
> hth 
> Peter Kröpfl
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
-- 
Sincerely,
Arsen A. Gutsal
SOFTSKY Ltd CEO/Executive
SOFTSKY - Cost effective Software Development


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


Re: accessing flow document from sitemap

Posted by Peter Kröpfl <pe...@groebi.com>.
Arsen A. Gutsal <arsen <at> softsky.com.ua> writes:

> 
> How can I access flow document within the sitemap?
> Let say I have 
> <generate src="somefile.xml">
> <map:select type="parameter-selector-test">
> <map:when test="{somefile/error}">
> 	<!-- this should be called when somefile.xml has /error tag -->
> </map:when>
> ....
> 
> Is that possible?

I guess you might be looking for this:

<map:call function="someFlowFunction" />

hth 
Peter Kröpfl





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