[opencms-dev] Inline Javascript within CDATA throws XMLunmarshalling error

Brock Haywood BHaywood at BCLC.com
Thu Jan 15 22:00:24 CET 2009


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.



More information about the opencms-dev mailing list