You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Dan Adams <da...@ifactory.com> on 2006/05/24 21:28:24 UTC

Template parser chokes on CDATA?

I have a template that has something like:

<script type="text/javascript">
//<![CDATA[ 
...
//]]>
</script> 

and I get a parse exception:
Tag <![CDATA[> on line 82 contains more than one 'sFlashVars:"textalign'
attribute.

Any suggestions? Thanks. :)

-- 
Dan Adams
Software Engineer
Interactive Factory
617.235.5857


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


Re: Template parser chokes on CDATA?

Posted by Paul Cantrell <ca...@pobox.com>.
This is the best thing to do. It buys you some excellent (though very  
poorly documented) functionality for doing substitutions in your JS  
code, too.

In spite of this good solution, it is really unfortunate that the  
Tapestry parser doesn't understand CDATA.

P

On May 24, 2006, at 2:59 PM, Erik Husby wrote:

> Or choose the simple way out and put the javascript into a Tapestry  
> Script file.
>
> <span jwcid="@Script" script="MyJavascript.script"/>
> ---
> Erik Husby
> Senior Software Engineer
> Broad Institute of MIT and Harvard
> Rm. 2192, 320 Charles St, Cambridge, MA 02141-2023
> mobile: 781.354.6669, office: 617.258.9227
> email: mhusby@broad.mit.edu AIM: ErikAtBroad
>

_________________________________________________________________
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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


Re: Template parser chokes on CDATA?

Posted by Erik Husby <mh...@broad.mit.edu>.
Or choose the simple way out and put the javascript into a Tapestry  
Script file.

<span jwcid="@Script" script="MyJavascript.script"/>
---
Erik Husby
Senior Software Engineer
Broad Institute of MIT and Harvard
Rm. 2192, 320 Charles St, Cambridge, MA 02141-2023
mobile: 781.354.6669, office: 617.258.9227
email: mhusby@broad.mit.edu AIM: ErikAtBroad


Re: Template parser chokes on CDATA?

Posted by Dan Adams <da...@ifactory.com>.
Yeah, i know about this way but wasn't sure if i could it without
putting it in comments.

On Wed, 2006-05-24 at 15:39 -0400, Jesse Kuhnert wrote:
> try :
> 
> 
> <script type="text/javascript">
> //<!-- <![CDATA[
> ...
> //-->]]>
> </script>
> 
> ?
> On 5/24/06, Dan Adams <da...@ifactory.com> wrote:
> >
> > I have a template that has something like:
> >
> > <script type="text/javascript">
> > //<![CDATA[
> > ...
> > //]]>
> > </script>
> >
> > and I get a parse exception:
> > Tag <![CDATA[> on line 82 contains more than one 'sFlashVars:"textalign'
> > attribute.
> >
> > Any suggestions? Thanks. :)
> >
> > --
> > Dan Adams
> > Software Engineer
> > Interactive Factory
> > 617.235.5857
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> 
> 
-- 
Dan Adams
Software Engineer
Interactive Factory
617.235.5857


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


Re: Template parser chokes on CDATA?

Posted by Jesse Kuhnert <jk...@gmail.com>.
try :


<script type="text/javascript">
//<!-- <![CDATA[
...
//-->]]>
</script>

?
On 5/24/06, Dan Adams <da...@ifactory.com> wrote:
>
> I have a template that has something like:
>
> <script type="text/javascript">
> //<![CDATA[
> ...
> //]]>
> </script>
>
> and I get a parse exception:
> Tag <![CDATA[> on line 82 contains more than one 'sFlashVars:"textalign'
> attribute.
>
> Any suggestions? Thanks. :)
>
> --
> Dan Adams
> Software Engineer
> Interactive Factory
> 617.235.5857
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.