> From: Jozsa Kristof [mailto:[EMAIL PROTECTED]]
> 
> Hi,
> 
> I've wrote a very simple Selector class (a class similar to
> SessionAttributeSelector), which checks whether the user has an
> authenticated session or an anonymous one. It returns a true or a
false
> value based on this.
> 
> Now when I'm trying to call it from the sitemap, I get a 'Stylesheet
> directed terminator' fatal error, with this trace in the logs:
> 
> java.lang.RuntimeException: Stylesheet directed termination


<snip/>

> --
> ..which does not help much.

Go into the log file, there you will find the message from stylesheet
before it terminated.


> The offending sitemap part is the following:
> --
>   <map:match pattern="blocks/login">
> 
>     <map:select type="session-check">
>       <map:when>

Must have test="" attribute.

>         <map:generate src="pages/blocks/login.xml"/>
>         <map:transform src="stylesheets/blocks/login.xsl"/>
>       </map:when>
>       <map:otherwise>
>         <map:generate src="pages/blocks/logout.xml"/>
>         <map:transform src="stylesheets/blocks/logout.xsl"/>
>       </map:otherwise>
>     </map:select>
> 
>     <map:transform src="stylesheets/blocks/default.xsl"/>
>     <map:serialize/>
>   </map:match>
> --
> 
> If I comment this block out, the thing works, so something inside
causes the
> error. The session-check selector is defined in the top of the sitemap
of
> course:
> <map:selector name="session-check"
> src="org.dyn.cocoon.auth.EJBSessionChecker"/>
> 
> and it's placed inside a jar, between two, already working Action
classes of
> mine.
> 
> 
> Anyone can enlighten me about what causes the error, or how should I
> correctly use my Selector class?

You must have test="" attribute. It will be parsed to your selector into
select() method.

Vadim


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

Reply via email to