View comments | RSS feed

XmlTransform

Description

Applies an Extensible Stylesheet Language Transformation (XSLT)) to an XML document object that is represented as a string variable. An XSLT converts an XML document to another format or representation by applying an Extensible Stylesheet Language (XSL) stylesheet to it. For more information, see Developing ColdFusion MX Applications with CFML.

Return value

A string; an XML document after the XSLT is applied

Category

Conversion functions, Extensibility functions, XML functions

Syntax

XmlTransform(xmlString | xmlObj, xslString)

See also

cfxml, IsXmlDoc, XmlChildPos, XmlChildPos, XmlFormat, XmlNew, XmlParse, XmlSearch

History

New in ColdFusion MX: this function is new.

Parameters

Parameter Description
xmlString | xmlObj
A string that represents the XML document, or a parsed object representation of it.
xslString
XSLT transformation to apply.

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6

Comments are no longer accepted for ColdFusion MX. ColdFusion 8 is the current version.

Comments


feikuhrwe said on Mar 12, 2003 at 3:02 PM :
This fails to mention that if your XSLT contains an <xsl:output> tag, it will be ignored by XMLTransform()unless you set "omit-xml-declaration=yes". You also -cannot- run your XSLT through the <cfxml> tag or it will also ignore your <xsl:output> tag.

The only way to ensure that your <xsl:output> declaration works with XMLTransform() is by using <cfsavecontent> (you can use <cfinclude> inside it if an external file) to get the XSLT in a variable and setting omit-xml-declaration to "yes" in the <xsl:output> tag.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6/CFML_Reference/functions-pt2124.htm