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
              [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------


> -----Original Message-----
> From: Jessica Niewint [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 03, 2002 5:10 PM
> To: [EMAIL PROTECTED]
> 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:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to