You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Z.Z." <za...@vili.pmmf.hu> on 2004/03/14 11:04:37 UTC

esql converts <> to <>

Hello All,

My database (postgresql) contains text fields which has html tags. 
In esql result I tried to use
esql:get-string, esql:get-ascii but it converts <> to &lt;&gt;
If I tried to use esql:get-xml it has an empty result.

So, how can I disable this converting?
-- 
thx,
----------------------------------------------------
Zoltan Zidarics programmer
PTE University Pecs, Hungary
icq: 43288694

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


Re: esql converts <> to <>

Posted by Marcin Okraszewski <ok...@o2.pl>.
Hi,
As I used htmlArea 3.0 beta, it created valid XHTML without any 
modifications :-) It even changes a HTML input written by hand to XHTML 
when changing back to WYSIWIG.

Regards,
Marcin Okraszewski


> Hello Marcin,
> 
> Thanks, it works well. Because I use HtmlArea for input, I can modify it to 
> make xhtml.
> 
> Sunday 14 March 2004 11.56 dátummal Marcin Okraszewski ezt írta:
> 
>>>My database (postgresql) contains text fields which has html tags.
>>>In esql result I tried to use
>>>esql:get-string, esql:get-ascii but it converts <> to &lt;&gt;
>>>If I tried to use esql:get-xml it has an empty result.
>>>
>>>So, how can I disable this converting?
>>
>>I think the only solution is to store XHTML in your DB - this is how I
>>do it.
>>
>>The reason of the empty result from esql:get-xml may be:
>>- malformed xml in db (I mean html without closed tags, etc); common
>>problem is &nbsp; which is not understood by XML parser - use &#160;
>>instead - far I remember, the xml *must* have a root element; so if you
>>have fragment like "some <b>html</b> fragment" it might not work; you can
>>wrap the content into some element like this:
>>	<esql:get-xml column="html_column"
>>		      root="p"
>>		      root-ns="http://www.w3.org/1999/xhtml"/>
>>you can also omit root-ns or add root-prefix if you want to prefix the
>>root.
>>
>>Regards,
>>Marcin Okraszewski


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


Re: esql converts <> to <>

Posted by "Z.Z." <za...@vili.pmmf.hu>.
Hello Marcin,

Thanks, it works well. Because I use HtmlArea for input, I can modify it to 
make xhtml.

Sunday 14 March 2004 11.56 dátummal Marcin Okraszewski ezt írta:
> > My database (postgresql) contains text fields which has html tags.
> > In esql result I tried to use
> > esql:get-string, esql:get-ascii but it converts <> to &lt;&gt;
> > If I tried to use esql:get-xml it has an empty result.
> >
> > So, how can I disable this converting?
>
> I think the only solution is to store XHTML in your DB - this is how I
> do it.
>
> The reason of the empty result from esql:get-xml may be:
> - malformed xml in db (I mean html without closed tags, etc); common
> problem is &nbsp; which is not understood by XML parser - use &#160;
> instead - far I remember, the xml *must* have a root element; so if you
> have fragment like "some <b>html</b> fragment" it might not work; you can
> wrap the content into some element like this:
> 	<esql:get-xml column="html_column"
> 		      root="p"
> 		      root-ns="http://www.w3.org/1999/xhtml"/>
> you can also omit root-ns or add root-prefix if you want to prefix the
> root.
>
> Regards,
> Marcin Okraszewski
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org

-- 
thx,
----------------------------------------------------
Zoltan Zidarics programmer
PTE University Pecs, Hungary
icq: 43288694

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


Re: esql converts <> to <>

Posted by Marcin Okraszewski <ok...@o2.pl>.
> My database (postgresql) contains text fields which has html tags. 
> In esql result I tried to use
> esql:get-string, esql:get-ascii but it converts <> to &lt;&gt;
> If I tried to use esql:get-xml it has an empty result.
> 
> So, how can I disable this converting?

I think the only solution is to store XHTML in your DB - this is how I 
do it.

The reason of the empty result from esql:get-xml may be:
- malformed xml in db (I mean html without closed tags, etc); common 
problem is &nbsp; which is not understood by XML parser - use &#160; instead
- far I remember, the xml *must* have a root element; so if you have 
fragment like "some <b>html</b> fragment" it might not work; you can 
wrap the content into some element like this:
	<esql:get-xml column="html_column"
		      root="p"
		      root-ns="http://www.w3.org/1999/xhtml"/>
you can also omit root-ns or add root-prefix if you want to prefix the root.

Regards,
Marcin Okraszewski

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