cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jozsa Kristof <dy...@kami.vein.hu>
Subject Using Selectors the correct way?
Date Tue, 29 Jan 2002 18:03:10 GMT
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
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1111)
at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371)
at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371)
at org.apache.cocoon.components.language.markup.LogicsheetCodeGenerator.generateCode(LogicsheetCodeGenerator.java:130)
at org.apache.cocoon.components.language.markup.AbstractMarkupLanguage.generateCode(AbstractMarkupLanguage.java:275)
at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:309)
at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createResource(ProgramGeneratorImpl.java:271)
at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:188)
at org.apache.cocoon.sitemap.Handler.run(Handler.java:208)
at java.lang.Thread.run(Thread.java:498)     
--
..which does not help much. 


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

tia,
Christopher
-- 
.Digital.Yearning.for.Networked.Assassination.and.Xenocide

---------------------------------------------------------------------
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