You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Fernando Padilla <fe...@alum.mit.edu> on 2008/03/26 18:37:10 UTC

[T5] Cdata?

So..

Is anyone using tapestry's CData support at present?
  (i think no one, since Cdata is not used in HTML)

Does anyone like it the way it currently is implemented?
  (i don't, but is anyone using them?)

Howard, are there any plans for changing the way CData is dealt with? 
enhanced?
  (you can read on for my enhancement ideas)
  (i just want to make sure that you don't already have plans)


-----

For those of you who don't know, CData sections are treated as static 
raw text.  That means that they are passed verbatim, without any 
processing, no ${} expansions, no sub components, anything.

-----

In XML land, CData sections are just sugar so that you don't have to 
espace every "<>&" into "&lt;&gt;&amp;".  It essentially changes the 
escaping rules for that section of the document.  But in XML land there 
is no easy mechanism to tell the transformer to output a particular 
section of the XML under CData escaping rules.

To being with, I would like to introduce another special element to 
Tapestry - <t:cdata> - that would ask tapestry to output the contained 
markup using CData rules. For example:

<t:cdata>
  &lt; &gt; &amp;
  ${expansionText}
  <a t:type="pagelink" page="start">start</a>
</t:cdata>

would generate:

<![CDATA[
  < > &
  expansionTextValue
  <a href="/start">start</a>
]]>


I think we can discuss how tapestry would deal with Cdata sections 
explicitly in the template.. if it would assume a <t:cdata> and allow 
expansions within it, or if they would get treated as static text as 
they are now..


ideas?

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