You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Stefan Geelen <st...@hotmail.com> on 2004/02/17 00:09:06 UTC

Sendmail.xsp and whitespace gives error ?

Hi,

following sendmail action (partially reproduced) runs fine:

<sendmail:send-mail>
  <sendmail:from><xsp:expr>request.get("from")</xsp:expr></sendmail:from>
    ...

==> Note that you should read the <sendmail:from> as one line (in case your mail program wraps it).

Now, with following an Lanaguage Expeption is generated:

<sendmail:send-mail>
  <sendmail:from>
    <xsp:expr>request.get("from")</xsp:expr>
  </sendmail:from>
..

Note that the sendmail:from is now split over 3 lines.

The error I get is :

 org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Error compiling update_announcement_list_xsp: ERROR 1 (org\apache\cocoon\www\xmlmill\xsp\update_announcement_list_xsp.java): .. _sendmail_mms.setFrom(String.valueOf( "" // start error (lines 545-545) "String literal is not properly closed by a double-quote" + " // end error " + ... Line 545, column 0: String literal is not properly closed by a double-quote 

This is quite annoying as xmlSpy will automatically split these lines each time I open this .xsp file.

What I want to know: Is this normal Cocoon behavior and/or is there a simple way to solve this problem ?

Regards,

Stefan





Re: Sendmail.xsp and whitespace gives error ?

Posted by Christian Haul <ha...@informatik.tu-darmstadt.de>.
Stefan Geelen wrote:
> Hi,
>  
> following sendmail action (partially reproduced) runs fine:
>  
> <sendmail:send-mail>
>   <sendmail:from><xsp:expr>request.get("from")</xsp:expr></sendmail:from>
>     ...
> ==> Note that you should read the <sendmail:from> as one line (in case 
> your mail program wraps it).
>  
> Now, with following an Lanaguage Expeption is generated:
>  
> <sendmail:send-mail>
>   <sendmail:from>
>     <xsp:expr>request.get("from")</xsp:expr>
>   </sendmail:from>
> ...
>  
> Note that the sendmail:from is now split over 3 lines.
>  
> The error I get is :
>  
>  org.apache.cocoon.ProcessingException: Language Exception: 
> org.apache.cocoon.components.language.LanguageException: Error compiling 
> update_announcement_list_xsp: ERROR 1 
> (org\apache\cocoon\www\xmlmill\xsp\update_announcement_list_xsp.java): 
> .. _sendmail_mms.setFrom(String.valueOf( "" // start error (lines 
> 545-545) "String literal is not properly closed by a double-quote" + " 
> // end error " + .. Line 545, column 0: String literal is not properly 
> closed by a double-quote
>  
> This is quite annoying as xmlSpy will automatically split these lines 
> each time I open this xsp file.
>  
> What I want to know: Is this normal Cocoon behavior and/or is there a 
> simple way to solve this problem ?

Err, yes. This is a known limitation of some (all?) logicsheets. Problem
here is that the whitespace usually is important and thus is converted
to java strings.  However, the linebreak isn't converted to a \n, so....

If you have a patch that handles this smarted, I'm sure it'll be welcomed.

	Chris.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Sendmail.xsp and whitespace gives error ?

Posted by go...@osmosis.gr.

there is a problem in stylesheet (xsls)
i have notice this probelmm some months ago and was discussed here, i 
have try to make some modification to xsls but they are too complex for me

ps 
you can cet up your xmlSpy to not split line for specific elements


--stavros
On Tue, 17 Feb 2004, Stefan Geelen wrote:

> Hi,
> 
> following sendmail action (partially reproduced) runs fine:
> 
> <sendmail:send-mail>
>   <sendmail:from><xsp:expr>request.get("from")</xsp:expr></sendmail:from>
>     ...
> 
> ==> Note that you should read the <sendmail:from> as one line (in case your mail program wraps it).
> 
> Now, with following an Lanaguage Expeption is generated:
> 
> <sendmail:send-mail>
>   <sendmail:from>
>     <xsp:expr>request.get("from")</xsp:expr>
>   </sendmail:from>
> ..
> 
> Note that the sendmail:from is now split over 3 lines.
> 
> The error I get is :
> 
>  org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Error compiling update_announcement_list_xsp: ERROR 1 (org\apache\cocoon\www\xmlmill\xsp\update_announcement_list_xsp.java): .. _sendmail_mms.setFrom(String.valueOf( "" // start error (lines 545-545) "String literal is not properly closed by a double-quote" + " // end error " + ... Line 545, column 0: String literal is not properly closed by a double-quote 
> 
> This is quite annoying as xmlSpy will automatically split these lines each time I open this .xsp file.
> 
> What I want to know: Is this normal Cocoon behavior and/or is there a simple way to solve this problem ?
> 
> Regards,
> 
> Stefan
> 
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org