You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Michael Zehrer <Ze...@optimal-systems.de> on 2002/08/02 14:25:27 UTC

inserting xml with util:include-expr

Hi List,

In earlier (2.0.2) versions of Cocoon I included a string containing
XML-Data from a session variable into XSPs this way:

<util:include-expr>
<util:expr><xsp:expr>
<xsp-session:get-attribute name="sometext"/>
</xsp:expr></util:expr>
</util:include-expr>

in 2.0.3 and recent 2.1-dev from cvs this gives the following error,
whats wrong?

org.apache.cocoon.components.language.LanguageException: Error compiling
search_xml:
ERROR 1
(/opt/WebSphere/AppServer/temp/default_host/AVOS/cocoon-files/org/apache
/cocoon/www/generators/search_xml.java):
...
this.characters("");

this.characters("");


// start error (lines 376-376) " method includeString(java.lang.Object,
org.apache.avalon.framework.component.ComponentManager,
org.xml.sax.ContentHandler) not found in class
org.apache.cocoon.components.language.markup.xsp.XSPUtil"
XSPUtil.includeString(

// end error

(

XSPSessionHelper.getSessionAttribute(session,

...
Line 376, column 14: method includeString(java.lang.Object,
org.apache.avalon.framework.component.ComponentManager,
org.xml.sax.ContentHandler) not found in class
org.apache.cocoon.components.language.markup.xsp.XSPUtil
Line 0, column 0: 
1 error






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

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: inserting xml with util:include-expr

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Michael Zehrer [mailto:Zehrer@optimal-systems.de]
> 
> Hi List,
> 
> In earlier (2.0.2) versions of Cocoon I included a string containing
> XML-Data from a session variable into XSPs this way:
> 
> <util:include-expr>
> <util:expr><xsp:expr>
> <xsp-session:get-attribute name="sometext"/>
> </xsp:expr></util:expr>
> </util:include-expr>
> 
> in 2.0.3 and recent 2.1-dev from cvs this gives the following error,
> whats wrong?

I think that's new bug. Until it is fixed use following work-around:

<util:include-expr>
<util:expr><xsp:expr>
String.valueOf(<xsp-session:get-attribute name="sometext"/>)
</xsp:expr></util:expr>
</util:include-expr>

Or, patch util.xsl (line ~206) to have same.

Vadim


> org.apache.cocoon.components.language.LanguageException: Error
compiling
> search_xml:
> ERROR 1
>
(/opt/WebSphere/AppServer/temp/default_host/AVOS/cocoon-files/org/apache
> /cocoon/www/generators/search_xml.java):
> ...
> this.characters("");
> 
> this.characters("");
> 
> 
> // start error (lines 376-376) " method
includeString(java.lang.Object,
> org.apache.avalon.framework.component.ComponentManager,
> org.xml.sax.ContentHandler) not found in class
> org.apache.cocoon.components.language.markup.xsp.XSPUtil"
> XSPUtil.includeString(
> 
> // end error
> 
> (
> 
> XSPSessionHelper.getSessionAttribute(session,
> 
> ...
> Line 376, column 14: method includeString(java.lang.Object,
> org.apache.avalon.framework.component.ComponentManager,
> org.xml.sax.ContentHandler) not found in class
> org.apache.cocoon.components.language.markup.xsp.XSPUtil
> Line 0, column 0:
> 1 error


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

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>