cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luca Morandini" <luca.morandi...@tin.it>
Subject RE: R: embedding html in xml ?
Date Thu, 03 Oct 2002 17:23:59 GMT
Jessica & Lorenzo,

I'd like conducting a little experiment....

let's suppose we have an XML like this:

<?xml version="1.0"?>
<page>
	<parameter>
		well-formed <a href="http://www.apache.org">Apache</a> html
		<br/>
	</parameter>
</page>

...and an XSL like this:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="page">
	<html>
		<head/>
		<body>
			<xsl:apply-templates/>
		</body>
	</html>
</xsl:template>

<xsl:template match="parameter">

			<p>
				value-of with escaping<br/>
		  		<xsl:value-of select="." disable-output-escaping="yes"/>
			</p>

			<p>
				value-of without escaping<br/>
		  		<xsl:value-of select="." disable-output-escaping="no"/>
			</p>

			<p>
				copy-of<br/>
				<xsl:copy-of select="./node()"/>
			</p>

</xsl:template>

</xsl:stylesheet>

..and a simple sitemap like:

<map:match pattern="test.html">
	<map:generate src="test.xml"/>
	<map:transform src="test.xsl"/>
	<map:serialize type="html"/>
</map:match>

...the result is that only "copy-of" respects the "tagging" of the HTML fragment.

Since I believe your method, somehow, works, could you please send me an example of the output
of the generation step (i.e. what
your XSP page retrieves from the database) ?

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 5:10 PM
> To: cocoon-users@xml.apache.org
> Subject: Re: R: embedding html in xml ?
>
>
> At 16.21 03/10/2002 +0200, you wrote:
> >Luca,
> >
> >I'm sure you're right with the specification. I was just sharing a humble
> >real life example.
> >
> >I actually have an XSP containing <esql:get-columns/>. One of the columns
> >contains HTML (which BTW most of the times isn't even well-formed at all
> >:-)), as I guessed in Jessica's case.
>
>
>
> Yes :-))
>
>
> >If I don't put any disable-output-escaping="yes" I get the whole markup
> >escaped and visible to the user. That's why I disable it, and get a nice
> >page fragment as designed by who put the HTML in the DB. This works to me,
> >even if sincerely I don't know why :-))
> >
>   Works also for me !!!! (and I also have no idea why 8-)))))
>
>
>


---------------------------------------------------------------------
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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message