[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xml-cocoon-users
Subject:    Re: XSP - escaping
From:       Geoff Howard <cocoon () leverageweb ! com>
Date:       2003-12-30 19:43:30
Message-ID: 3FF1D562.3080109 () leverageweb ! com
[Download RAW message or body]

Jan Wielgus wrote:

> Hello, 
> 
> I have the following problem:
> I am using a textarea to submit some content which then is written
> to an xml file with source writing transformer. The problem is, I
> want the "<" and ">" characters not to be replaced with "&lt;" and
> "&gt;"
> 
> I am working with XSP and the I pass the content from the textarea
> as a parameter to an xsp page, where I have the code that writes it
> to a file:
> 
> <source:write>
> <source:source>context://test.xml</source:source>
> <source:fragment>
> <root>
>     <xsp-request:get-parameter name="inhalt"/>
> </root>
> </source:fragment>
> </source:write>
> 
> I have read about such problems on this list and I saw a such solution:
> 
> <util:include-expr>
> <util:expr>
> <xsp-request:get-parameter name="inhalt"/>
> </util:expr>
> </util:include-expr>
> 
> But when I put this between the <root>-tags withing the write-source
> fragment then I get an error message that says:
> 
> org.xml.sax.SAXParseException: Content is not allowed in prolog.
> 
> What am I doing wrong?
> 
> Any help appreciated

This may be just related to extra whitespace in your source:write 
"fragment" since it looks like you're writing a whole document and not a 
"fragment".  Try to get rid of the whitespace between <source:fragment> 
and <root>.

If not, it would help if you provide more of the stack trace.

Geoff


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic