You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jessica Niewint <j....@kiosco.org> on 2002/10/03 11:05:56 UTC
embedding html in xml ?
Until my books are arriving I have to continue to post all my questions
that couldn't be answered by mysql and the internet ....
In my database is saved a paragraph which contains not only pure text, but
also an url . Via esql (xsp) I read this data and generate with my xsl and
html document.
How can I realize an output of an "click-able" url?
---------------------------------------------------------------------
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: embedding html in xml ?
Posted by Jessica Niewint <j....@kiosco.org>.
I will have a look at. since I am a newbie to the xml-cocoon world sometime
it is even difficult to ask the right question for a problem.
But in this case, everything is resolved now,
Thanks again
Jessica
At 14.12 03/10/2002 +0200, you wrote:
>funny how often this question comes up,
>
>you might want to see the thread "question about escaping" that deals
>with this exact same problem.
>
>Dmitry Olyenyov wrote:
> > The right way is <esql:get-xml column="content"/>
>
>/patrik
>
>Jessica Niewint wrote:
>>Thanks Luca,
>>but my problem is that the stored text in the database which belongs to
>>the <parameter> tag is something like this:
>>.... blablablablabla <a href="somelink.tosomething.com">
>>blablabla</a>blablablabla .......
>>so the contained html in the stored text could be also an image, table,
>>etc ....
>>So I am afraid of that could be against "the rules" of xml ... since the
>>content of my tag is mixed ....
>>So what could be a solution ? Use the CDATA tag ???
>>
>>---------------------------------------------------------------------
>>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>
---------------------------------------------------------------------
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: embedding html in xml ?
Posted by Patrik Husfloen <pa...@student.liu.se>.
funny how often this question comes up,
you might want to see the thread "question about escaping" that deals
with this exact same problem.
Dmitry Olyenyov wrote:
> The right way is <esql:get-xml column="content"/>
/patrik
Jessica Niewint wrote:
> Thanks Luca,
>
> but my problem is that the stored text in the database which belongs to
> the <parameter> tag is something like this:
>
> .... blablablablabla <a href="somelink.tosomething.com">
> blablabla</a>blablablabla .......
>
> so the contained html in the stored text could be also an image, table,
> etc ....
> So I am afraid of that could be against "the rules" of xml ... since the
> content of my tag is mixed ....
>
> So what could be a solution ? Use the CDATA tag ???
>
>
> ---------------------------------------------------------------------
> 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>
RE: embedding html in xml ?
Posted by Luca Morandini <lu...@tin.it>.
Jessica,
1) your XML document is well-formed XML, don't worry about "mixed" content: ain't XHTML well-formed XML ?
2) you could serve your HTML (both text and link) with something like:
<xsl:template match="parameter">
<xsl:copy-of select="./node()"/>
</xsl:template>
Best regards,
---------------------------------------------
Luca Morandini
GIS Consultant
lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------
> -----Original Message-----
> From: Jessica Niewint [mailto:j.niewint@kiosco.org]
> Sent: Thursday, October 03, 2002 12:22 PM
> To: cocoon-users@xml.apache.org
> Subject: RE: embedding html in xml ?
>
>
> Thanks Luca,
>
> but my problem is that the stored text in the database which belongs to the
> <parameter> tag is something like this:
>
> .... blablablablabla <a href="somelink.tosomething.com">
> blablabla</a>blablablabla .......
>
> so the contained html in the stored text could be also an image, table, etc
> ....
> So I am afraid of that could be against "the rules" of xml ... since the
> content of my tag is mixed ....
>
> So what could be a solution ? Use the CDATA tag ???
>
>
> ---------------------------------------------------------------------
> 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>
RE: embedding html in xml ?
Posted by Jessica Niewint <j....@kiosco.org>.
Thanks Luca,
but my problem is that the stored text in the database which belongs to the
<parameter> tag is something like this:
.... blablablablabla <a href="somelink.tosomething.com">
blablabla</a>blablablabla .......
so the contained html in the stored text could be also an image, table, etc
....
So I am afraid of that could be against "the rules" of xml ... since the
content of my tag is mixed ....
So what could be a solution ? Use the CDATA tag ???
---------------------------------------------------------------------
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: embedding html in xml ?
Posted by Luca Morandini <lu...@tin.it>.
Jessica,
XHTML is XML... hence you can treat HTML as XML in you stylesheets (of course the serializer must be HTML).
For instance, something like:
<xsl:variable link="@link">
<a href="$link">clickable link</a>
or:
<xsl:element name="a">
<xsl:attribute name="href"><xsl:value-of="@link"/></xsl:attribute>
clickable link
</xsl:element>
would work.
Best regards,
---------------------------------------------
Luca Morandini
GIS Consultant
lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------
> -----Original Message-----
> From: Jessica Niewint [mailto:j.niewint@kiosco.org]
> Sent: Thursday, October 03, 2002 11:06 AM
> To: cocoon-users@xml.apache.org
> Subject: embedding html in xml ?
>
>
> Until my books are arriving I have to continue to post all my questions
> that couldn't be answered by mysql and the internet ....
>
> In my database is saved a paragraph which contains not only pure text, but
> also an url . Via esql (xsp) I read this data and generate with my xsl and
> html document.
> How can I realize an output of an "click-able" url?
>
>
> ---------------------------------------------------------------------
> 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>