cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: Using Selectors the correct way?
Date Wed, 30 Jan 2002 14:41:36 GMT
> From: Jozsa Kristof [mailto:dynax@kami.vein.hu]
> 
> On Tue, Jan 29, 2002 at 01:41:53PM -0500, Vadim Gritsenko wrote:
> > > From: Jozsa Kristof [mailto:dynax@kami.vein.hu]
> > >
> > > 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/>
> ..
> >
> > You must have test="" attribute. It will be parsed to your selector
into
> > select() method.
> >
> > Vadim
> 
> Okay, I've added test="foobar" and now it works. But in theory, it
seems to
> be unlogical to provide a test="" attribute in any case - see, I just
had a
> Selector, where it could decide upon the situation without any
additional
> attributes.. :)

That's specifics of your component, and not general logic for selectors.
Check XSLT's <xsl:choose> element syntax. It is very similar to
<map:select>.

Also, consider using matchers or actions. Actions work without
additional attributes, matchers require pattern="".

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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message