Accessibility

TechNote (Archived)

Generating XML output breaks on ColdFusion MX 6.1 (DevNet version only)

Issue


The Macromedia ColdFusion MX 6.1 edition available with a Macromedia DevNet Professional Subscription is a full Enterprise Edition version of ColdFusion MX 6.1, available to multiple IPs, but intended for development purposes only.

The DevNet Server software license agreement does not permit using this edition in production or staging, and at runtime the DevNet Edition inserts a "watermark" into the generated output from a template. The watermark can be seen as an additional META tag as shown here:

<META NAME="ColdFusionMXEdition" CONTENT="ColdFusion DevNet Edition - Not for Production Use.">

While this watermark does not adversely affect generated HTML output, it can break generated XML well-formedness if the application is producing XML or XSLT as output. If the code used to the generate the XML output did not set the content-type to "text/xml", then the watermark will be added to the XML output.

The effect of the watermark on the XML well-formedness can be demonstrated with a browser's built-in parser when it attempts to style the XML for display. For example, Microsoft Internet Explorer 6.02 produces the following error:

 The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. ------------------------------------------------ The following tags were not closed: META. 

Solution


If using a ColdFusion MX DevNet Edition, the solution for generating XML without the DevNet watermark is to set the content-type to text-xml using the cfcontent tag.

Example:

 <CFSETTING showdebugoutput="No"><CFSET currentDir = GetDirectoryFromPath(cgi.cf_template_path)><CFFILE action="READ"     variable="xmlDoc"><CFCONTENT type="text/xml"><CFOUTPUT>#xmlDoc#</CFOUTPUT> 

Additional Information



AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support


Document Details

ID:tn_18845
Browser:Chrome
Internet Explorer
Netscape
Opera
Safari
Firefox

Products Affected:

coldfusion