You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Robert Sösemann <ro...@gmx.de> on 2002/11/12 13:43:45 UTC
How to handle xml-fragment from db
Hey,
who can help to solve the following problem?
In my relational db I have a column with XHTML fragments and want to bring
it into my cocoon pipline the following way.
DB ROW CONTENT:
-----------------------
...<P>foobar</P><B>....
GENERATOR:
---------------
XSP that extracts this rows value by
...
<TXT>
<esql:get-string column="i.text"/>
</TXT>
TRANSFORMER:
--------------------
XSL that tries to obtain this:
...
<TD>
<xsl:value-of select="TEXT/."/>
</TD>
THE RESULT THAT I WANT:
---------------------------------
...
<TD>
...<P>foobar</P><B>....
</TD>
WHAT I GET INSTEAD:
---------------------------
...
<TD>
<P>.... <--- only escaped text
</TD>
...
I also tried to use <esql:get-xml column="i.text"/> and <xsl:text
disable-output-escaping="yes">. But without success. Whats wrong???
---------------------------------------------------------------------
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: How to handle xml-fragment from db
Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 12.Nov.2002 -- 01:43 PM, Robert S?semann wrote:
> Hey,
>
> who can help to solve the following problem?
>
> In my relational db I have a column with XHTML fragments and want to bring
> it into my cocoon pipline the following way.
>
> DB ROW CONTENT:
> ...<P>foobar</P><B>....
>
> GENERATOR:
> XSP that extracts this rows value by
> ...
> <TXT>
> <esql:get-string column="i.text"/>
> </TXT>
>
> TRANSFORMER:
> XSL that tries to obtain this:
> ...
> <TD>
> <xsl:value-of select="TEXT/."/>
> </TD>
>
> THE RESULT THAT I WANT:
> ...
> <TD>
> ...<P>foobar</P><B>....
> </TD>
>
> WHAT I GET INSTEAD:
> ...
> <TD>
> <P>.... <--- only escaped text
> </TD>
> ...
>
> I also tried to use <esql:get-xml column="i.text"/> and <xsl:text
> disable-output-escaping="yes">. But without success. Whats wrong???
With esql:get-string it is included as text, hence the escaped
<,>. With esql:get-xml it is included as XML (i.e. sax-events). For
this it needs to be valid XML (i.e. exactly one root element, all
namespaces declared).
Chris.
--
C h r i s t i a n H a u l
haul@informatik.tu-darmstadt.de
fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08
---------------------------------------------------------------------
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: How to handle xml-fragment from db
Posted by Mohamed El-Refaey <m....@imkenberg.de>.
Hi Robert
mainly the returned XmlFragment that u retrieve from DB as String must
be parsed before u can deal with it ... that is why u have the code
string for the symbol "<"--- >
"<" ... I faced this problem also but I didn't use XSP ...I implemeted a Transformer to get this String fragment and parse it and stream it out into the pipline to be proccesed as u want through ur stylesheet.
so u must parse the String before u deal with it.
I wish that will help
Mohamed El-Refaey
Robert Sösemann wrote:
>Hey,
>
>who can help to solve the following problem?
>
>In my relational db I have a column with XHTML fragments and want to bring
>it into my cocoon pipline the following way.
>
>DB ROW CONTENT:
>-----------------------
>...<P>foobar</P><B>....
>
>GENERATOR:
>---------------
>XSP that extracts this rows value by
>...
><TXT>
><esql:get-string column="i.text"/>
></TXT>
>
>TRANSFORMER:
>--------------------
>XSL that tries to obtain this:
>...
><TD>
> <xsl:value-of select="TEXT/."/>
></TD>
>
>THE RESULT THAT I WANT:
>---------------------------------
>...
><TD>
> ...<P>foobar</P><B>....
></TD>
>
>WHAT I GET INSTEAD:
>---------------------------
>...
><TD>
> <P>.... <--- only escaped text
></TD>
>...
>
>I also tried to use <esql:get-xml column="i.text"/> and <xsl:text
>disable-output-escaping="yes">. But without success. Whats wrong???
>
>
>
>---------------------------------------------------------------------
>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>
>
>
>
>
---------------------------------------------------------------------
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>