cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From O.Vobe...@sh.cvut.cz
Subject Re: disable-output-escaping
Date Wed, 07 Jan 2004 05:08:38 GMT
Thanks for your idea description. But I don't know, if it would be 
uneconomical - because I have stored several HTML snippets in one record (they 
are readed just once). And if I would read every snippet separately, I would 
become multiple loading. What do you think about it?

Otmar


Cituji z emailu od Joerg Heinicke <joerg.heinicke@gmx.de>:

> On 07.01.2004 03:37, O.Vobejda@sh.cvut.cz wrote:
> 
> > Thanks for your answer, but have I any other choices to create HTML output
> from 
> > HTML fragments, they are readed from database? I'm doing a CMS, so I'm
> reading 
> > some HTML fragments from database (as title, abstract, content of article,
> 
> > etc.) plus many other stuff (forum notes, questionnaires etc.) - all is
> putted 
> > into XML by generator and transformed by XSLT transformer to the
> appropriate 
> > form.
> 
> Let the generator do the escaping - or is it not well-formed? If it's 
> just HTML what about the HTMLGenerator? You are not the first one asking 
> for solution for HTML snippets from the database, so other can give 
> their experiences here I guess. I can imagine following approach:
> 
> <map:match pattern="HTML-from-DB">
>    <map:read type="database" src="InWhichWayYouEverAccessYourDB"/>
> </map:match>
> 
> <map:match pattern="html-snippet">
>    <map:generate type="html" src="cocoon:/HTML-from-DB"/>
>    <map:serialize type="xml"/>
> </map:match>
> 
> <map:match pattern="site">
>    <map:aggregate>
>      <map:part src="yourgenerator"/>
>      <map:part src="cocoon:/html-snippet"/>
>    </map:aggregate>
> </map:match>
> 
> "yourgenerator" is the replacement for the generator you currently use. 
> If it's more than a file generator you have to put it in another 
> pipeline and access it via cocoon:/.
> 
> This or a similar approach is much cleaner than disabling output escaping.
> 
> > I simply tried to add disable-output-escaping element:
> > 
> > <xsl:value-of select="body" disable-output-escaping="yes"/>
> > (element <body> contains escaped content of article)
> > 
> > ... but it returns usual escaped content as before. This "feature" has to
> be 
> > enabled somewhere or transformer has to have some extra parameters?
> 
> No, nothing to be enabled or parameterized. Is there an additional 
> transformer between this stylesheet and the serializer? This won't work.
> 
> Joerg
> 
> > Cituji z emailu od Joerg Heinicke <joerg.heinicke@gmx.de>:
> > 
> > 
> >>This "feature" is not disabled, but not recommended to be used. Can you 
> >>show a simple stylesheet that does not work?
> >>
> >>Joerg
> >>
> >>On 07.01.2004 01:31, O.Vobejda@sh.cvut.cz wrote:
> >>
> >>
> >>>Hi, 
> >>>
> >>>I tried use attribute disable-output-escaping in XSLT transformer (by
> >>
> >>xsl:value-
> >>
> >>>of and xsl:copy-of), but it doesn't work, it seems (the output is
> encoded
> >>
> >>as 
> >>
> >>>well as unusing the attribute). What I'm doing wrong? Thanks a lot!
> >>>
> >>>Otmar Vobejda
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 




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


Mime
View raw message