cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulrich Mayring <u...@denic.de>
Subject Re: permit quoting
Date Wed, 26 Jul 2000 11:49:19 GMT
tcurdt@dff.st wrote:
> 
> > > 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.

Well, because <, > and & are XML things. The above is good for escaping
un-XML things. You cannot embed XML in non-XML and expect it doesn't get
escaped. So, here's what you can do:

<![CDATA[
	javascriptcode
]]>
	<tr>
<![CDATA[
	more javascriptcode
]]>

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Mime
View raw message