cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Torsten Curdt" <tcu...@dff.st>
Subject RE: permit quoting
Date Wed, 26 Jul 2000 20:00:11 GMT
> > > > What about javascript inside the HTML page. Well, you can pass it
> > > > as long it is inside the xsl:comment tag. Which should be ok for
> > > > most reasons. But as far as I know javascript can and sometimes
> > > > even is supposed to live outside a comment tag. What's up then?
> > > > How do I get the '<' character?
> > >
> > > Easy, like this:
> > > <script language="javascript" type="text/javascript">
> > > 	<![CDATA[
> > > 	<!--//
> > > 	javascriptcode
> > > 	//-->
> > > 	]]>
> > > </script>
> >
> > Hm... so why does my <![CDATA[ </tr> <tr> ]]> not get passed
> > then? All I get is &lt/tr&gt etc.
>
> Because of context. This fragment:
>
> <script>
> <![CDATA[
> if (i > 0) { alert("hi"); }
> ]]>
> </script>
>
> will be serialized by the HTMLFormatter as
>
> <script>
> if (i > 0) { alert("hi"); }
> </script>
>
> the HTMLFormatter knows that the angle bracket entities should be printed
> as characters, not entities, when they appear inside a script element.
>
> This fragment:
>
> <table>
> <tr>
> <![CDATA[
> </tr><tr>
> ]]>
> </tr>
> </table>
>
> will be serialized by the HTMLFormatter as
>
> <table>
> <tr>
> &lt;/tr&gt;&lt;tr&gt;
> </tr>
> </table>
>
> because, essentially, your CDATA section is telling the parser to treat
> "</tr><tr>" as text, not elements. XSLT doesn't work well when you try to
> use it to construct trees in an unbalanced fashion.

Ah.... thank you for clearing this stuff up!!
Now I know how -or better- why and go back trying to
get a XSLT sollution for this thing. ;-)
Robin said he's doing a mini taglib for this....

> cocoon _should_ support the disable-output-escaping flag, you're
> absolutely correct, but i don't think anyone's actively working on fixing
> that. most of the developers seem to feel that it's a dangerous shortcut
> and it's not worth fixing in cocoon1 when there's so much else to be done.
> if you want submit a patch for cocoon1 to add support for the XSLT output
> indicator elements, i'd be delighted to incorporate it.

Well, as you say: "there's so much else to be done"! So right now I will
not have the time to check that out but later on I will take a look at it.
What's up with Cocoon2 - will C2 support the output indicators?
--
Torsten


Mime
View raw message