You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Chris Lewis (JIRA)" <de...@tapestry.apache.org> on 2007/11/21 14:56:43 UTC

[jira] Issue Comment Edited: (TAPESTRY-1818) Template parser should handle CDATA blocks

    [ https://issues.apache.org/jira/browse/TAPESTRY-1818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12544469 ] 

chrislewis edited comment on TAPESTRY-1818 at 11/21/07 5:56 AM:
-----------------------------------------------------------------

<script> and <style> blocks are declared as having PCDATA in XHTML 1.0 (http://www.w3.org/TR/xhtml1/#h-4.8). I personally view this as broken since characters '<' and '>' are quite important in CSS ans Javascript. Aside from that, it presented me with a problem (currently unsolvable) using T5. I use some 'raw script' to configure some JS behavior, injected into the page body using addScript. In my case I needed to match some elements based on a selector using the prototype method <a href="http://www.prototypejs.org/api/element/getelementsbyselector">getElementsBySelector</a>. In the selector I used the direct child operator ('>'), and after 20-30 minutes of confusion, realized that T5 was filtering this to an entity (for XML correctness).

The problem is that there's no way around this. When the content is declared as having <![CDATA[ ]]>, T5 throws the painful exception:

"Not implemented yet: CDATA[ ... ]"

      was (Author: chrislewis):
    &lt;script&gt; and &lt;style&gt; blocks are declared as having PCDATA in XHTML 1.0 (http://www.w3.org/TR/xhtml1/#h-4.8). I personally view this as broken since characters '&lt' and '&gt;' are quite important in CSS ans Javascript. Aside from that, it presented me with a problem (currently unsolvable) using T5. I use some 'raw script' to configure some JS behavior, injected into the page body using addScript. In my case I needed to match some elements based on a selector using the prototype method <a href="http://www.prototypejs.org/api/element/getelementsbyselector">getElementsBySelector</a>. In the selector I used the direct child operator ('&gt;'), and after 20-30 minutes of confusion, realized that T5 was filtering this to an entity (for XML correctness).

The problem is that there's no way around this. When the content is declared as having <b>&lt;![CDATA[ ]]&gt;</b>, T5 throws the painful exception:

"Not implemented yet: CDATA[ ... ]"
  
> Template parser should handle CDATA blocks
> ------------------------------------------
>
>                 Key: TAPESTRY-1818
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1818
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.0.5
>            Reporter: Hugo Palma
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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