On 5/24/05, Pete Ruckelshaus <[EMAIL PROTECTED]> wrote: > Dave, > > That's what I'm doing in a similar CFM page (that I want to convert to > CFC), and it works fine: > > <cfsetting enablecfoutputonly="yes" showdebugoutput="no"> > <cfquery name="getEmail" datasource="local"> > select firstname, email > from tblArsUsers > where userid LIKE '#param#%' > </cfquery> > <cfheader name="content-type" value="text/xml"> > <cfcontent type="text/xml"> > <cfoutput><?xml version="1.0" standalone="yes"?> > <userdata> > <cfloop query="getEmail"><firstname>#getEmail.firstname#</firstname> > <email>#getEmail.email#</email> > </cfloop></userdata></cfoutput><cfsetting enablecfoutputonly="no" > showdebugoutput="no"><cfabort> >
Pete, CFMs NEQ CFCs. That's my rule. You can't always use the same coding rules across the two file types. Your CFM template might work just fine, but the CFCs aren't guaranteed to follow every CFM construct the same way. Tags like cfcontent might be perfectly fine in CFM templates, but might not work the same way in CFCs. There have been a couple threads over the last few weeks where other people have run into this problem, and moving the cfcontent tag out of the CFCs has taken care of it. Further, if you make sure to religiously put output="false" in your cfcomponent and cffunction tags, then you will not get any whitespace, which removes the need for the cfsetting tag anyway. Regards, Dave. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:207565 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54