Results 1 to 2 of 2
Thread: Coldfusion Paths and XSLT
-
01-09-2010, 03:22 PM #1
Coldfusion Paths and XSLT
Hey I'm using cold-fusion to take a .XML file and mix it with a .XSL file
My code is currently like this -
Code:<!--- transform.cfm ---> <cfset MyXmlFile = Expandpath("http://www.celticquicknews.co.uk/rss.xml")> <cffile action="READ" variable="xmlInput" file="#MyXmlFile#"> <cfset MyXmlFile = Expandpath("Stylesheets/celtrss.xsl")> <cffile action="READ" variable="xslInput" file="#MyXmlFile#"> <cfset xmlOutput = XMLTransform(xmlInput, xslInput)> <!--- data is output ---> <cfcontent type="text/html" reset="yes"> <cfoutput>#xmloutput#</cfoutput> <cfinclude template="menu.html">
-
02-02-2010, 11:23 AM #2
What does "doesn't work" mean? Do you get an error...?
Without knowing more, it looks like you're using both Expandpath() and CFFILE incorrectly. CFFILE reads files on _your_ local server. To read a url of a remote server you need to use CFHTTP.
Also, ExpandPath() it is intended for use with a relative path on your server. For example, it can convert the shortcut for root "/" to a physical path like "C:\ColdFusion8\wwwrooot"




Reply With Quote

