Le message suivant a �t� �crit par Nicolas Rod le 25. 02. 05 15:13:
Le message suivant a �t� �crit par Reinhard Poetz le 23. 02. 05 17:42:
Nicolas Rod wrote:
Hi all,
I'd like to know if there is a possibility to access the XML flow
content in a custom Selector. The goal would to test the presence or
not of a special tag (an 'xinclude') in the XML flow generated above
in a pipeline.
Is there a way to access the flow content in the Selector, in order
to make a XPATH query for instance ?
yes, use the method getContextObject of the
org.apache.cocoon.components.flow.FlowHelper
Hi,
I tried to look for in this direction but couldn't find out how to use
your answer. I must admit I am a newbie with cocoon.
I added this line in the select(...) method of a Selector:
Object flowContext = FlowHelper.getContextObject(objectModel) ;
And flowContext returned is null.
I looked a little on the web for FlowHelper, and everything I found was
related to control flow. So far, I haven't used control flow at all, but
only custom generators and actions.
I'd like to have someting similar to:
<map:match pattern="**.html">
<map:generate type="MyGenerator" src="..."/>
<map:select type="tagExists">
<map:when test="myTag">
<map:read src="myPage1.html" mime-type="text/html"/>
</map:when>
<map:otherwise>
<map:read src="myPage2.html" mime-type="text/html"/>
</map:otherwise>
</map:select>
</map:match>
And depending on the presence of the xml tag "myTag" generated by
MyGenerator, read myPage1, or myPage2.
Can we use FlowHelper in a Selector, and access the generated XML,
without using control flow ?
Thanks for your help
Hello,
Any idea about the way to build such a selector ?
Thanks a lot, as I can't go further without help...
Nicolas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]