Hi Ludovic. Thank you for trying to help me. I tried to move the <util:include-expr> tag inside <xsp:logic>, it doesn't help. What I want to do with this HTML file is pass it to xsl transformer, apply some templates and output it as xml file. Since xsp generates xml, there is no problem of passing HTML further in the pipeline. In xsp I just read the content of the HTML file. I don't understand why this is not working. If I just put the string that is returned by u.getFileContents() function into <xsp:expr> tag (without <util:include-expr>) , it works, but outputs entities instead of <,>. Also, if I'm declaring a simple variable inside <xsp:logic>, for example String foo = "<br/>"; then outside the <xsp:logic> I can write something like <p> This is some file <util:include-expr><util:expr><xsp:expr> foo </xsp:expr></util:expr> </util:include-expr> content </p>
and I get the resulting page correctly. But if I write in the same manner: <xsp:logic> String get = u.getFileContents(URL of the file); <p> <util:include-expr><util:expr><xsp:expr> get </xsp:expr></util:expr> </util:include-expr> </p> </xsp:logic> I get an error:org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not include page Open quote is expected for attribute "size|". I just don't understand what this error means, and I don't understand if the whole thing doesn't work. If somebody has any idea, please tell me. Thank you all very much for your concern. Anna ----- Original Message ----- From: "Ludovic de Beaurepaire" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 25, 2002 12:04 PM Subject: Re: Inserting XML Strings 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 <b>Bold<b> > > > > 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]> --------------------------------------------------------------------- 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]>