[opencms-dev] Inline Javascript within CDATA throwsXMLunmarshalling error
Brock Haywood
BHaywood at BCLC.com
Fri Jan 16 22:56:57 CET 2009
This seems to be the result having nested CDATA sections. I've looked
at the control code for the webpage and because everything in that pages
<content> node is within a CDATA section, when I use my own CDATA
section, it blows up the xml.
Is there anyway to dynamically add the CDATA sections to my content? Or
something else to handle this problem?
Thanks,
Brock
-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Brock Haywood
Sent: January 15, 2009 1:00 PM
To: opencms-dev at opencms.org
Subject: [opencms-dev] Inline Javascript within CDATA
throwsXMLunmarshalling error
Hi,
I'm trying to migrate a site to opencms. I've run into a problem where
there is some inline javascript in a content html page. The following
code produces this error:
Unmarshalling XML document failed.
Reason: Error on line 55 of document : The element type
"content" must be terminated by the matching end-tag "</content>".
Nested exception: The element type "content" must be terminated by the
matching end-tag "</content>".
Here's the code:
<script type="text/javascript">
//<![CDATA[
var so = new SWFObject(
"/Banner/loader/bannerLoader.swf",
"homepage",
"550", "217",
"7",
"#FFFFFF");
so.addParam("wmode", "transparent");
so.addParam("allowScriptAccess", "sameDomain");
so.addVariable("BannerFilePath", "/Banner/bannerConfig.xml");
so.write("SWFBanner");
//]]>
</script>
I've narrowed it down to the CDATA sections within the script tags. If
I remove that then the page saves correctly, however, I am using the
xstandard editor so we can guarantee xhtml compliant code so this is not
really an options for me.
Can anyone suggest a workaround or what I'm doing wrong? I'm using
OpenCms 7.0.5.
Thanks,
Brock
This email is intended only for the addressee. It may contain
confidential or proprietary information that cannot be disclosed without
BCLC's permission. If you have received this email in error, please
notify the sender immediately and delete the email.
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please
visit
http://lists.opencms.org/mailman/listinfo/opencms-dev
This email is intended only for the addressee. It may contain confidential or proprietary information that cannot be disclosed without BCLC's permission. If you have received this email in error, please notify the sender immediately and delete the email.
More information about the opencms-dev
mailing list