House of Fusion
Home of the ColdFusion Community

Search cf-talk

December 02, 2008

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
   1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31       

Search over 2,500 ColdFusion resources here  >>>      
Home /  Groups /  ColdFusion Talk (CF-Talk)

xmlTransform() and an unnecessary xml declaration

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Ian Skinner
08/28/2008 10:52 AM

Is there a way to stop this code from producing an unnecessary XML declaration.  When I run the following code it produces an XML declaration after the body tag. <body>    <?xml version="1.0" encoding="UTF-8"?> Is there someway to control this, or do I just need to do some string parsing after the transformation? <cfsavecontent variable="displayXSL"> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">;     <xsl:template match="table/thead" />     <xsl:template match="table/tr">     <div>         <strong><xsl:value-of select="td[1]"/></strong>     </div>     </xsl:template> </xsl:stylesheet> </cfsavecontent> </cfsilent><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">; <html xmlns="http://www.w3.org/1999/xhtml">;     <head>         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />         <title>XSLT Fun</title>     </head>     <body>         <cfoutput>#xmlTransform(skillsXML,displayXSL)#</cfoutput>     </body> </html>

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Ian Skinner
08/28/2008 01:50 PM

Ian Skinner wrote: > Is there a way to stop this code from producing an unnecessary XML > declaration. Why yes, yes there is a way to stop this.  Add the following line to your XSLT code Ian. <xsl:output method="html" encoding="utf-8"/>

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dominic Watson
08/28/2008 04:36 PM

> Why yes, yes there is a way to stop this.  Add the following line to > your XSLT code Ian. > > <xsl:output method="html" encoding="utf-8"/> Thanks for the follow up, google will be pleased :) Dominic


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists