|
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
xmlTransform() and an unnecessary xml declaration
Is there a way to stop this code from producing an unnecessary XMLIan Skinner 08/28/08 10:52 A Ian Skinner wrote:Ian Skinner 08/28/08 01:50 P > Why yes, yes there is a way to stop this. Add the following line toDominic Watson 08/28/08 04:36 P 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> 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"/> > 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
|
Mailing Lists
|
Latest Fusion Authority Articles
|
||||||