cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "I-Lin Kuo" <ikuoi...@hotmail.com>
Subject newbie xsp question
Date Mon, 03 Feb 2003 17:00:45 GMT
In the sample xsp provided with cocoon, on the page

docs/samples/xsp/simple.xsp

There's a section of code that looks like this:

     <xsp:logic>
       <![CDATA[
       for (int i=0; i<3; i++) {]]><![CDATA[
       ]]>
         <li>
           Item <xsp:expr>i</xsp:expr>
         </li>
       <![CDATA[
       } ]]><![CDATA[
       ]]>
     </xsp:logic>

I understand that the CDATA sections are needed to escape the "<" in the for 
loop declaration, but it seems to me that only one such is needed. To test 
this, I made up another page with the following:

<ul>
<xsp:logic>
<![CDATA[
	for (int j=0;j<3;j++) ]]>{
		<li>Item <xsp:expr>j</xsp:expr></li>
	}
</xsp:logic>
</ul>

This worked, and confirmed my suspicions. So my question is, why were there 
so many CDATA sections in the original, and when am I supposed to use them?

Also, I'd appreciate it if someone could explain what xsp:content is 
supposed to do, or refer me to some place in the documentation where all the 
tags are listed (I couldn't find any).

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


---------------------------------------------------------------------
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