I need help with my application. Its a web site that recieves a XML from a webservice and build a web page from it, using XSLT.
The problem is that when I try to create a FCKeditor using the generated page from the XML, I get an "unterminated string literal error".
Here is the XSLT :
*** start xsl code ***
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
*** xsl code continues ***
<xsl:output method="xml" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" indent="yes" cdata-section-elements="xsl:comment"/>
<script language="JavaScript" type="text/javascript">
<xsl:comment>
var oFCKeditor = new FCKeditor('paginaGenerada');
oFCKeditor.BasePath = /home/FCKeditor/";
oFCKeditor.ToolbarSet = 'Default' ;
oFCKeditor.width = '100%';
oFCKeditor.height = '100%';
oFCKeditor.Create();
function FCKeditor_OnComplete( editorInstance )
{
var html =
'<xsl:value-of select="//code/xhtml" />';
editorInstance.InsertHtml(html,true);
}
</xsl:comment>
</script>
*** xsl code continues ***
The error appears around the "var html = " section of the code.
I would appreciate any help or suggestion for posting this problem in a more appropiate forum..
Thanks !!!
Tue, 06/27/2006 - 13:03
#1
RE: XSLT w/ FCKeditor.
If that doesn't work, try putting the script part into a CDATA section, it should then be ignored by the XSLT processor.
RE: XSLT w/ FCKeditor.
cdata-section-elements="xsl:comment"
remove that first before putting it in cdata tags...