You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tim Cavanagh <ti...@tafe.sa.edu.au> on 2002/09/12 07:18:15 UTC

Re: Arrgh, more XML/HTML problems now it's '&'

Hi Justin

We too are having problems doing very much the same thing.

We are having major problems with the serializer adding line breaks to list
elements such as <ul><li>blah</li></ul> is being parsed out as:

<ul>

<li>blah</li>

</ul>

We are using a middleware product called the VCe that look at the output
from a form and when it sees a line break it puts in a <br /> tag (among
other things). This ends up with the following output

<ul><br />
<br />
<li>blah</li><br />
<br />
</ul><br />


And of course if the users edit this content again it goes into:

<ul><br /><br />
<br /><br />
<li>blah</li><br /><br />
<br /><br />
</ul><br /><br />

The best solution for us is to somehow tell the serializer (html) not to
format or add line breaks to list elements but how how that is the
question???

Regards

Tim Cavanagh

>Here are some problems I've encountered so far.
>
>1) users don't follow XML rules very well (goes along with point 1)
>2) the HTMLSerializer changes the users data by turning <br/> into <br>, etc
>3) the XML Serializer changes the users data by turning
><textarea></textarea> into <textarea/>, etc
>4) bad user input will cause SAXExceptions if it's not enclosed in
>CDATA sections
>


---------------------------------------------------------------------
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: Arrgh, more XML/HTML problems now it's '&'

Posted by Vadim Gritsenko <va...@verizon.net>.
Tim Cavanagh wrote:

>Hi Justin
>
>We too are having problems doing very much the same thing.
>
>We are having major problems with the serializer adding line breaks to list
>elements such as <ul><li>blah</li></ul> is being parsed out as:
>
><ul>
>
><li>blah</li>
>
></ul>
>
>We are using a middleware product called the VCe that look at the output
>from a form and when it sees a line break it puts in a <br /> tag (among
>other things). This ends up with the following output
>
><ul><br />
><br />
><li>blah</li><br />
><br />
></ul><br />
>
>
>And of course if the users edit this content again it goes into:
>
><ul><br /><br />
><br /><br />
><li>blah</li><br /><br />
><br /><br />
></ul><br /><br />
>
>The best solution for us is to somehow tell the serializer (html) not to
>format or add line breaks to list elements but how how that is the
>question???
>

Try adding <indent> element to serializer's configuration:

<map:serializer ...>
    <indent>no</indent>
...

Vadim




>Regards
>
>Tim Cavanagh
>
>  
>
>>Here are some problems I've encountered so far.
>>
>>1) users don't follow XML rules very well (goes along with point 1)
>>2) the HTMLSerializer changes the users data by turning <br/> into <br>, etc
>>3) the XML Serializer changes the users data by turning
>><textarea></textarea> into <textarea/>, etc
>>4) bad user input will cause SAXExceptions if it's not enclosed in
>>CDATA sections
>>    
>>




---------------------------------------------------------------------
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>