Hello Anna,

The following piece of XSP code works well :

****************************************************
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsp:page language="java" xmlns:xsp="http://apache.org/xsp";
xmlns:util="http://apache.org/xsp/util/2.0";>

<xsp:structure>

<xsp:include>org.apache.cocoon.components.language.markup.xsp.*</xsp:include
>
</xsp:structure>

<xsp:logic>
String parameter = (String)(request.getAttribute("parametrage"));
<util:include-expr>
<util:expr><xsp:expr>
parameter
</xsp:expr></util:expr>
</util:include-expr>
</xsp:logic>
</xsp:page>
****************************************************

So, try to have <util:include-expr> tag inside <xsp:logic>
Perhaps it corrects your first error. You should have a look to your
generated java file to be sure.

But i am not sure it is a good choice : If you try to insert in your event
pipeline some HTML code, you will have problems because it is not XML (Could
not include page Open quote is expected for attribute "size|". ???).

So, what do you want to do with your HTML file : send it to the client or
transform it ? Give us more info please.

Ludovic
----- Original Message -----
From: "Anna Afonchenko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 25, 2002 10:12 AM
Subject: Re: Inserting XML Strings


> Hi. Sorry that I enter your discussion, but I have almost the same
problem.
> I am trying to read from the html file and output the content as xml.
> What I'm writing in xsp is:
>   <xsp:logic>
>      XSPUtil u = new XSPUtil();
>      String get = u.getFileContents('URL of the file');
>   </xsp:logic>
>   <p> This is some file content
>    <util:include-expr><util:expr>
>     <xsp:expr>get</xsp:expr>
>    </util:expr></util:include-expr>
>   </p>
>
> and I get the following error:
> org.apache.cocoon.ProcessingException: Language Exception:
> org.apache.cocoon.components.language.LanguageException: Error compiling
> final_xsp: Line 146, column 37: ')' expected Line 149, column 8: not a
> statement Line 152, column 6: illegal start of expression Line 146, column
> 23: 'void' type not allowed here Line 145, column 14: method
includeString()
> not found in class
org.apache.cocoon.components.language.markup.xsp.XSPUtil
> Line 0, column 0: 5 errors
>
> The strange thing is that if I write the content of the p tag slightly
> different (all in one line):
>
<util:include-expr><util:expr><xsp:expr>get</xsp:expr></util:expr></util:inc
> lude-expr>
> then I get a totally different error message:
> org.apache.cocoon.ProcessingException: Exception in
> ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not
> include page Open quote is expected for attribute "size|".
>
> Maybe somebody knows what am I doing wrong?
> Thank you in advance.
>
> Anna
>
> ----- Original Message -----
> From: "Ludovic de Beaurepaire" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, November 25, 2002 11:01 AM
> Subject: Re: Inserting XML Strings
>
>
> Hi Daniel,
>
> Try this to insert XML strings :
>
> <util:include-expr><util:expr><xsp:expr>
> yourXmlString
> </xsp:expr></util:expr></util:include-expr>
>
> Ludovic
>
> ----- Original Message -----
> From: "Daniel G. Pamintuan II" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, November 24, 2002 12:51 PM
> Subject: Inserting XML Strings
>
>
> > Hello Experts,
> >
> > How do I insert XML/HTTP strings into the event pipeline from XSP. I'm
> > using Cocoon 2.0.3. I tried using the <util:include-expr> as described
> > in the November 2002 archives but it didn't work. All the tags (e.g.
> > <b>Bold</b>) results into &lt;b&gt;Bold&lt;b&gt;
> >
> > I'm not pulling data from SQL so get-XML can't do. Data comes from a
> > textarea returned via the Request object.
> >
> > Regards,
> >
> > Daniel
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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:     <[EMAIL PROTECTED]>
> > For additional commands, e-mail:   <[EMAIL PROTECTED]>
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> 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:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>
> ---------------------------------------------------------------------
> 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:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>
>


---------------------------------------------------------------------
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:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to