RE: Whitespace Woes
> Not sure! could you explain why it would be a good idea to > call a custom tag within a cfoutput tag? One reason that occurs to me offhand would be if you're using CFSETTING to only output things that are explicitly within CFOUTPUT. I'm not sure why people think it's a bad idea to use CFML within CFOUTPUT tags, though. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199892 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=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Whitespace Woes
>>could you explain why it would be a good idea to call a custom tag within a cfoutput tag? I didn't say it was a good idea. Rather I was asking why it would be a bad idea? -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199880 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=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Whitespace Woes
How about: #id# #name# view Some hypothetical context: the site uses SEF urls, and the l:link tag takes care of creating the A tag with the SEF url embedded. cheers, barneyb On Wed, 23 Mar 2005 23:26:25 -0400, Andrew Grosset <[EMAIL PROTECTED]> wrote: > >>>it's not a good idea to call any tag within a CFOUTPUT tag > > > >Why not gracious Lord? > > Not sure! could you explain why it would be a good idea to call a custom tag > within a cfoutput tag? -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199859 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
Re: Whitespace Woes
>>>it's not a good idea to call any tag within a CFOUTPUT tag > >Why not gracious Lord? Not sure! could you explain why it would be a good idea to call a custom tag within a cfoutput tag? ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199857 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=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Whitespace Woes
>>it's not a good idea to call any tag within a CFOUTPUT tag Why not gracious Lord? -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| 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:199738 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
Re: Whitespace Woes
In general, I'd agree. But that's not a reason to make your custom tags dependant on that fact, particularly one whose purpose is to reduce whitespace. http://www.spike.org.uk/blog/index.cfm?mode=entry&entry=CC663650-D565-E33F-3DA8032FED9A0DC8 Spike's got a nice method for ensuring that your tags aren't called from within CFOUTPUT. might be a good candidate for that tag. cheers, barneyb On Tue, 22 Mar 2005 18:57:07 -0400, Andrew Grosset <[EMAIL PROTECTED]> wrote: > me thinks it's not a good idea to call any tag within a CFOUTPUT tag...at > least I'd try not to if at all possible. > > Andrew. -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199725 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
Re: Whitespace Woes
me thinks it's not a good idea to call any tag within a CFOUTPUT tag...at least I'd try not to if at all possible. Andrew. > If you call the tag within a CFOUTPUT tag, then you'll get a few > extra > lines of whitespace above the whitespace-suppressed content. The > actual suppression won't be affected, but the tag itself will > generate > a few extra lines. If it's not within a CFOUTPUT tag, then it won't > put those extra few lines in there. > > cheers, > barneyb > > On Tue, 22 Mar 2005 17:02:15 -0400, Andrew Grosset <[EMAIL PROTECTED] > com> wrote: > > Hmmm > > > > I can't give you an example but using MX6.1 and with strengthmode on > maximum it will eliminate 99% of whitespace and output all the html on > one line > > > > Andrew. > > -- > Barney Boisvert > [EMAIL PROTECTED] > 360.319.6145 > http://www.barneyb.com/ > > Got Gmail? I have 50 invites. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199724 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=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Whitespace Woes
If you call the tag within a CFOUTPUT tag, then you'll get a few extra lines of whitespace above the whitespace-suppressed content. The actual suppression won't be affected, but the tag itself will generate a few extra lines. If it's not within a CFOUTPUT tag, then it won't put those extra few lines in there. cheers, barneyb On Tue, 22 Mar 2005 17:02:15 -0400, Andrew Grosset <[EMAIL PROTECTED]> wrote: > Hmmm > > I can't give you an example but using MX6.1 and with strengthmode on maximum > it will eliminate 99% of whitespace and output all the html on one line > > Andrew. -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199717 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
Re: Whitespace Woes
>Ironically, this tag has exactly the problem I illustrated, and >consequently will usually end up rendering a bunch of extra whitespace >itself. > >cheers, >barneyb > Hmmm I can't give you an example but using MX6.1 and with strengthmode on maximum it will eliminate 99% of whitespace and output all the html on one line Andrew. ~| 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:199715 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
Re: Whitespace Woes
CFSAVECONTENT will do exactly what you need. If the output is going to take a lot of steps to create, you might want to look at not using raw string concatenation. Check http://www.barneyb.com/blog/archives/2004_12.jsp#000250 for a couple methods for avoiding it. cheers, barneyb On Tue, 22 Mar 2005 14:50:20 -0700, Jim McAtee <[EMAIL PROTECTED]> wrote: > What I've decided to do is build the output of the tag within a string and > use: > > > > > #tagout# > > But the old tag had a conditional where it would call another tag > > > > > > Can I capture the output of that called tag and place it into the tagout > string variable? -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| 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:199712 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
Re: Whitespace Woes
What I've decided to do is build the output of the tag within a string and use: #tagout# But the old tag had a conditional where it would call another tag Can I capture the output of that called tag and place it into the tagout string variable? - Original Message - From: "Jim McAtee" <[EMAIL PROTECTED]> To: "CF-Talk" Sent: Tuesday, March 22, 2005 2:25 PM Subject: Re: Whitespace Woes >I think that's it. Thanks Barney. > > - Original Message - > From: "Barney Boisvert" <[EMAIL PROTECTED]> > To: "CF-Talk" > Sent: Tuesday, March 22, 2005 2:18 PM > Subject: Re: Whitespace Woes > > >> CFOUTPUT carries across includes and tags for enableCFOUTPUTonly >> processing. So if the tag is called within a CFOUTPUT block, your >> CFSETTING tag will have no effect. Since that info is outside the >> scope of what the tag can possibly know, you're better off skipping >> CFSETTING and only using CFSILENT inside custom tags. It might be >> overkill sometimes, but it's always guarenteed to work. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199709 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=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Whitespace Woes
Ironically, this tag has exactly the problem I illustrated, and consequently will usually end up rendering a bunch of extra whitespace itself. cheers, barneyb On Tue, 22 Mar 2005 16:34:08 -0400, Andrew Grosset <[EMAIL PROTECTED]> wrote: > >CF5/IIS5 > > > >I have a CFML tag constructed to produce as little white space as > >possible - > > another way is to use this custom tag: StripWhiteSpace.cfm > > > > > > > > > > > > > > > > "[[:space:]]{2,}", " ", "ALL")> > > > "([#Chr(13)##Chr(10)#][^[:graph:]]*[#Chr(13)##Chr(10)#])", > "#Chr(13)##Chr(10)#", "ALL")> > "[ #Chr(9)#]{2,}", "", "ALL")> > > > "([#Chr(13)##Chr(10)#][^[:graph:]]*[#Chr(13)##Chr(10)#])", > "#Chr(13)##Chr(10)#", "ALL")> > "[ #Chr(9)#]{2,}", " ", "ALL")> > > > "([#Chr(13)##Chr(10)#][^[:graph:]]*[#Chr(13)##Chr(10)#])", > "#Chr(13)##Chr(10)#", "ALL")> > > > > > > > > > > > > > I'm not sure who originally wrote it, but it works well. > > If you place it in the same directory as the calling template you can call it > like this: > > > > -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199707 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
Re: Whitespace Woes
>CF5/IIS5 > >I have a CFML tag constructed to produce as little white space as >possible - another way is to use this custom tag: StripWhiteSpace.cfm I'm not sure who originally wrote it, but it works well. If you place it in the same directory as the calling template you can call it like this: ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199706 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=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Whitespace Woes
I think that's it. Thanks Barney. - Original Message - From: "Barney Boisvert" <[EMAIL PROTECTED]> To: "CF-Talk" Sent: Tuesday, March 22, 2005 2:18 PM Subject: Re: Whitespace Woes > CFOUTPUT carries across includes and tags for enableCFOUTPUTonly > processing. So if the tag is called within a CFOUTPUT block, your > CFSETTING tag will have no effect. Since that info is outside the > scope of what the tag can possibly know, you're better off skipping > CFSETTING and only using CFSILENT inside custom tags. It might be > overkill sometimes, but it's always guarenteed to work. > > cheers, > barneyb > > On Tue, 22 Mar 2005 14:09:54 -0700, Jim McAtee > <[EMAIL PROTECTED]> wrote: >> CF5/IIS5 >> >> I have a CFML tag constructed to produce as little white space as >> possible - or so I thought. Basically, as shown bellow. Much more >> complex, including many queries, but the key is that only one >> >> block gets executed between the tags. The whole tag should >> produce only about 50 characters of output. >> >> >> >> >> >> >> >> >> >> ... >> >> ... >> >> >> ... >> >> ... >> >> >> >> >> But the tag is producing a _lot_ of white space, both before and after >> the >> executed block, and I cannot figure out where it's coming >> from. >> Everything within the cfinclude'd template shown above is itself >> contained >> within a block, as it only sets some variables. > Donations & Support: http://www.houseoffusion.com/tiny.cfm/54 ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199705 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
Re: Whitespace Woes
Application.cfm is entirely within a block as well. - Original Message - From: "Gaulin, Mark" <[EMAIL PROTECTED]> To: "CF-Talk" Sent: Tuesday, March 22, 2005 2:16 PM Subject: RE: Whitespace Woes > The standard answer for this question is "Did you check any > application.cfm files?" > > -Original Message- > From: Jim McAtee [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 22, 2005 4:10 PM > To: CF-Talk > Subject: Whitespace Woes > > > CF5/IIS5 > > I have a CFML tag constructed to produce as little white space as > possible - or so I thought. Basically, as shown bellow. Much more > complex, including many queries, but the key is that only one > block gets executed between the tags. The whole tag should > produce only about 50 characters of output. > > > > > . > > . > > > > ... > > ... > > > ... > > ... > > . > > > > But the tag is producing a _lot_ of white space, both before and after > the > executed block, and I cannot figure out where it's coming > from. > Everything within the cfinclude'd template shown above is itself > contained > within a block, as it only sets some variables. > > > > > ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199704 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=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Whitespace Woes
CFOUTPUT carries across includes and tags for enableCFOUTPUTonly processing. So if the tag is called within a CFOUTPUT block, your CFSETTING tag will have no effect. Since that info is outside the scope of what the tag can possibly know, you're better off skipping CFSETTING and only using CFSILENT inside custom tags. It might be overkill sometimes, but it's always guarenteed to work. cheers, barneyb On Tue, 22 Mar 2005 14:09:54 -0700, Jim McAtee <[EMAIL PROTECTED]> wrote: > CF5/IIS5 > > I have a CFML tag constructed to produce as little white space as > possible - or so I thought. Basically, as shown bellow. Much more > complex, including many queries, but the key is that only one > block gets executed between the tags. The whole tag should > produce only about 50 characters of output. > > > > > > > > > > ... > > ... > > > ... > > ... > > > > > But the tag is producing a _lot_ of white space, both before and after the > executed block, and I cannot figure out where it's coming from. > Everything within the cfinclude'd template shown above is itself contained > within a block, as it only sets some variables. -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199702 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=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Whitespace Woes
The standard answer for this question is "Did you check any application.cfm files?" -Original Message- From: Jim McAtee [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 22, 2005 4:10 PM To: CF-Talk Subject: Whitespace Woes CF5/IIS5 I have a CFML tag constructed to produce as little white space as possible - or so I thought. Basically, as shown bellow. Much more complex, including many queries, but the key is that only one block gets executed between the tags. The whole tag should produce only about 50 characters of output. . . ... ... ... ... . But the tag is producing a _lot_ of white space, both before and after the executed block, and I cannot figure out where it's coming from. Everything within the cfinclude'd template shown above is itself contained within a block, as it only sets some variables. ~| 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:199701 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
RE: whitespace woes
I've had success when outputting CSV data w/ using , and then to avoid outputting any junk. >>> [EMAIL PROTECTED] 10/24/02 05:08PM >>> Did you check for something in application.cfm? -Original Message- From: Will Stalder [mailto:skith_diphi@;hotmail.com] Sent: Thursday, October 24, 2002 3:13 PM To: CF-Talk Subject: whitespace woes I'm having with trouble with ColdFusion and extraneous whitespace. And yes, I've done my Google searching. The problem is that I'm trying to output an XML file, and it's crucial that there not be any whitespace before the declaration. An extremely simplified likeness of my ColdFusion script (with line numbers, lest e-mail word-wrapping confuse you) is thus: 1 2 3 4 5 6 7 http://www.foo.com/bar.dtd";> 8 9 10 11 So this page shows an HTML page with a form on it by default, and if the form is submitted, it spits out XML. As you can see, I'm trying at least two different ways to eliminate CF's whitespace: the SuppressWhitespace and EnableCFOutputOnly. The problem is that this is what I get from this simplified script (the problem is the same in my big one): http://www.foo.com/bar.dtd";> You'll note the extra space before the http://www.foo.com/bar.dtd";> Much to my surprise, the output of this file (with the proper URL inputs) is: 1 http://www.foo.com/bar.dtd";> Which means the space is being added *before* any of my whitespace-suppressing measures. All of which just annoys the heck out of me. Sure, I can go in and manually delete that space, but I shouldn't *have* to. Are there any wise warriors out there that could help here? To my knowledge, we're running ColdFusion 4.0 on the server, although I only recently inherited this project, and I'm not sure. Thanks, Todd ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com
RE: whitespace woes
If you are using CF 4.5 or above you can use the tag to not output anything. Clint ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
RE: whitespace woes
try using - I have found with both 4.5 and 5 that it sometimes will allow you to suppress whitespace that you cant with -Original Message- From: Gaulin, Mark [mailto:mgaulin@;globalspec.com] Sent: Thursday, October 24, 2002 2:09 PM To: CF-Talk Subject: RE: whitespace woes Did you check for something in application.cfm? -Original Message- From: Will Stalder [mailto:skith_diphi@;hotmail.com] Sent: Thursday, October 24, 2002 3:13 PM To: CF-Talk Subject: whitespace woes I'm having with trouble with ColdFusion and extraneous whitespace. And yes, I've done my Google searching. The problem is that I'm trying to output an XML file, and it's crucial that there not be any whitespace before the declaration. An extremely simplified likeness of my ColdFusion script (with line numbers, lest e-mail word-wrapping confuse you) is thus: 1 2 3 4 5 6 7 http://www.foo.com/bar.dtd";> 8 9 10 11 So this page shows an HTML page with a form on it by default, and if the form is submitted, it spits out XML. As you can see, I'm trying at least two different ways to eliminate CF's whitespace: the SuppressWhitespace and EnableCFOutputOnly. The problem is that this is what I get from this simplified script (the problem is the same in my big one): http://www.foo.com/bar.dtd";> You'll note the extra space before the http://www.foo.com/bar.dtd";> Much to my surprise, the output of this file (with the proper URL inputs) is: 1 http://www.foo.com/bar.dtd";> Which means the space is being added *before* any of my whitespace-suppressing measures. All of which just annoys the heck out of me. Sure, I can go in and manually delete that space, but I shouldn't *have* to. Are there any wise warriors out there that could help here? To my knowledge, we're running ColdFusion 4.0 on the server, although I only recently inherited this project, and I'm not sure. Thanks, Todd ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com
RE: whitespace woes
As a few people suggested, I played around with the application.cfm file - I had not realized that it was appended to the beginning of my regular .cfm file. Interestingly enough, application.cfm didn't contain any excess spaces, but it did have several non-outputting tags each on their own line, so I imagine it was the CR's that were giving me grief. Anyhow, put all of application.cfm on one line, and my mysterious space is now gone. Thanks to all who helped out. Todd ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
Re: whitespace woes
Do you have an Application.cfm file that is being run perhaps? On Thursday, Oct 24, 2002, at 12:13 US/Pacific, Will Stalder wrote: > I'm having with trouble with ColdFusion and extraneous whitespace. And > yes, I've done my Google searching. > > The problem is that I'm trying to output an XML file, and it's crucial > that there not be any whitespace before the > declaration. > > An extremely simplified likeness of my ColdFusion script (with line > numbers, lest e-mail word-wrapping confuse you) is thus: > > 1 ENABLECFOUTPUTONLY="Yes" SHOWDEBUGOUTPUT="No"> > 2 > 3 > 4 > 5 > 6 > 7 http://www.foo.com/bar.dtd";> > 8 > 9 > 10 > 11 > > So this page shows an HTML page with a form on it by default, and if > the > form is submitted, it spits out XML. > > As you can see, I'm trying at least two different ways to eliminate > CF's > whitespace: the SuppressWhitespace and EnableCFOutputOnly. > > The problem is that this is what I get from this simplified script (the > problem is the same in my big one): > > http://www.foo.com/bar.dtd";> > > > You'll note the extra space before the Very > annoying. > > In an attempt to discover why all my attempts at suppressing excess > whitespace failed, I inserted random characters to find out at what > point > ColdFusion was inserting that space. A simplified version follows > (note the > extra "1" on the first line): > > 1 ENABLECFOUTPUTONLY="Yes" SHOWDEBUGOUTPUT="No"> > > > > > > http://www.foo.com/bar.dtd";> > > > > > > Much to my surprise, the output of this file (with the proper URL > inputs) > is: > 1 > http://www.foo.com/bar.dtd";> > > > Which means the space is being added *before* any of my > whitespace-suppressing measures. > > All of which just annoys the heck out of me. Sure, I can go in and > manually delete that space, but I shouldn't *have* to. > > Are there any wise warriors out there that could help here? To my > knowledge, we're running ColdFusion 4.0 on the server, although I only > recently inherited this project, and I'm not sure. > > Thanks, > Todd ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
RE: whitespace woes
Did you check for something in application.cfm? -Original Message- From: Will Stalder [mailto:skith_diphi@;hotmail.com] Sent: Thursday, October 24, 2002 3:13 PM To: CF-Talk Subject: whitespace woes I'm having with trouble with ColdFusion and extraneous whitespace. And yes, I've done my Google searching. The problem is that I'm trying to output an XML file, and it's crucial that there not be any whitespace before the declaration. An extremely simplified likeness of my ColdFusion script (with line numbers, lest e-mail word-wrapping confuse you) is thus: 1 2 3 4 5 6 7 http://www.foo.com/bar.dtd";> 8 9 10 11 So this page shows an HTML page with a form on it by default, and if the form is submitted, it spits out XML. As you can see, I'm trying at least two different ways to eliminate CF's whitespace: the SuppressWhitespace and EnableCFOutputOnly. The problem is that this is what I get from this simplified script (the problem is the same in my big one): http://www.foo.com/bar.dtd";> You'll note the extra space before the http://www.foo.com/bar.dtd";> Much to my surprise, the output of this file (with the proper URL inputs) is: 1 http://www.foo.com/bar.dtd";> Which means the space is being added *before* any of my whitespace-suppressing measures. All of which just annoys the heck out of me. Sure, I can go in and manually delete that space, but I shouldn't *have* to. Are there any wise warriors out there that could help here? To my knowledge, we're running ColdFusion 4.0 on the server, although I only recently inherited this project, and I'm not sure. Thanks, Todd ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
Re: whitespace woes
If you've got an application.cfm file that's prepending to your xml output page, you might want to wrap the entire application.cfm in -- and make sure there's no extra carriage returns at the top or bottom. Isaac Certified Advanced ColdFusion 5 Developer www.turnkey.to 954-776-0046 > I'm having with trouble with ColdFusion and extraneous > whitespace. And > yes, I've done my Google searching. > The problem is that I'm trying to output an XML file, and > it's crucial > that there not be any whitespace before the version="1.0"?> > declaration. > An extremely simplified likeness of my ColdFusion script > (with line > numbers, lest e-mail word-wrapping confuse you) is thus: > 1 SUPPRESSWHITESPACE="Yes"> ENABLECFOUTPUTONLY="Yes" SHOWDEBUGOUTPUT="No"> > 2 > 3 > 4 > 5 > 6 > 7 http://www.foo.com/bar.dtd";> > 8 > 9 > 10 > 11 ENABLECFOUTPUTONLY="No"> > So this page shows an HTML page with a form on it by > default, and if the > form is submitted, it spits out XML. > As you can see, I'm trying at least two different ways to > eliminate CF's > whitespace: the SuppressWhitespace and EnableCFOutputOnly. > The problem is that this is what I get from this > simplified script (the > problem is the same in my big one): > > http://www.foo.com/bar.dtd";> > > You'll note the extra space before the line. Very > annoying. > In an attempt to discover why all my attempts at > suppressing excess > whitespace failed, I inserted random characters to find > out at what point > ColdFusion was inserting that space. A simplified version > follows (note the > extra "1" on the first line): > 1 SUPPRESSWHITESPACE="Yes"> ENABLECFOUTPUTONLY="Yes" SHOWDEBUGOUTPUT="No"> > > > > > > http://www.foo.com/bar.dtd";> > > > > ENABLECFOUTPUTONLY="No"> > Much to my surprise, the output of this file (with the > proper URL inputs) > is: > 1 > http://www.foo.com/bar.dtd";> > > Which means the space is being added *before* any of my > whitespace-suppressing measures. > All of which just annoys the heck out of me. Sure, I can > go in and > manually delete that space, but I shouldn't *have* to. > Are there any wise warriors out there that could help > here? To my > knowledge, we're running ColdFusion 4.0 on the server, > although I only > recently inherited this project, and I'm not sure. > Thanks, > Todd > ~~ > ~~~| > Archives: > http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 > Subscription: http://www.houseoffusion.com/index.cfm?sideb > ar=lists&body=lists/cf_talk > FAQ: http://www.thenetprofits.co.uk/coldfusion/faq > Your ad could be here. Monies from ads go to support these > lists and provide more resources for the community. > http://www.fusionauthority.com/ads.cfm ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
RE: whitespace woes
Any chance the space is being added in the Application.cfm file? -- Mosh Teitelbaum evoch, LLC Tel: (301) 625-9191 Fax: (301) 933-3651 Email: [EMAIL PROTECTED] WWW: http://www.evoch.com/ > -Original Message- > From: Will Stalder [mailto:skith_diphi@;hotmail.com] > Sent: Thursday, October 24, 2002 3:13 PM > To: CF-Talk > Subject: whitespace woes > > > I'm having with trouble with ColdFusion and extraneous whitespace. And > yes, I've done my Google searching. > > The problem is that I'm trying to output an XML file, and it's crucial > that there not be any whitespace before the > declaration. > > An extremely simplified likeness of my ColdFusion script (with line > numbers, lest e-mail word-wrapping confuse you) is thus: > > 1 ENABLECFOUTPUTONLY="Yes" SHOWDEBUGOUTPUT="No"> > 2 > 3 > 4 > 5 > 6 > 7 http://www.foo.com/bar.dtd";> > 8 > 9 > 10 > 11 > > So this page shows an HTML page with a form on it by default, and if the > form is submitted, it spits out XML. > > As you can see, I'm trying at least two different ways to eliminate CF's > whitespace: the SuppressWhitespace and EnableCFOutputOnly. > > The problem is that this is what I get from this simplified script (the > problem is the same in my big one): > > http://www.foo.com/bar.dtd";> > > > You'll note the extra space before the annoying. > > In an attempt to discover why all my attempts at suppressing excess > whitespace failed, I inserted random characters to find out at what point > ColdFusion was inserting that space. A simplified version > follows (note the > extra "1" on the first line): > > 1 ENABLECFOUTPUTONLY="Yes" SHOWDEBUGOUTPUT="No"> > > > > > > http://www.foo.com/bar.dtd";> > > > > > > Much to my surprise, the output of this file (with the proper URL inputs) > is: > 1 > http://www.foo.com/bar.dtd";> > > > Which means the space is being added *before* any of my > whitespace-suppressing measures. > > All of which just annoys the heck out of me. Sure, I can go in and > manually delete that space, but I shouldn't *have* to. > > Are there any wise warriors out there that could help here? To my > knowledge, we're running ColdFusion 4.0 on the server, although I only > recently inherited this project, and I'm not sure. > > Thanks, > Todd > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
RE: whitespace woes
I feel you pain my brother. Put it all on one line. -Original Message- From: Will Stalder [mailto:skith_diphi@;hotmail.com] Sent: Thursday, October 24, 2002 12:13 PM To: CF-Talk Subject: whitespace woes I'm having with trouble with ColdFusion and extraneous whitespace. And yes, I've done my Google searching. The problem is that I'm trying to output an XML file, and it's crucial that there not be any whitespace before the declaration. An extremely simplified likeness of my ColdFusion script (with line numbers, lest e-mail word-wrapping confuse you) is thus: 1 2 3 4 5 6 7 http://www.foo.com/bar.dtd";> 8 9 10 11 So this page shows an HTML page with a form on it by default, and if the form is submitted, it spits out XML. As you can see, I'm trying at least two different ways to eliminate CF's whitespace: the SuppressWhitespace and EnableCFOutputOnly. The problem is that this is what I get from this simplified script (the problem is the same in my big one): http://www.foo.com/bar.dtd";> You'll note the extra space before the http://www.foo.com/bar.dtd";> Much to my surprise, the output of this file (with the proper URL inputs) is: 1 http://www.foo.com/bar.dtd";> Which means the space is being added *before* any of my whitespace-suppressing measures. All of which just annoys the heck out of me. Sure, I can go in and manually delete that space, but I shouldn't *have* to. Are there any wise warriors out there that could help here? To my knowledge, we're running ColdFusion 4.0 on the server, although I only recently inherited this project, and I'm not sure. Thanks, Todd ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
Re: whitespace woes
Will Stalder wrote: > I'm having with trouble with ColdFusion and extraneous whitespace. Which version? Jochem ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
RE: whitespace woes
Try this: http://www.foo.com/bar.dtd";> clears the output buffer (including whitespace) prior to resetting the content-type header. At least, that's how it works in CF 4.x and CF 5. I had this problem as well delivering a web service to a platform using a weak COM parser. Forget the I've never seen it work correctly anyway . -mk -Original Message- From: Will Stalder [mailto:skith_diphi@;hotmail.com] Sent: Thursday, October 24, 2002 2:13 PM To: CF-Talk Subject: whitespace woes I'm having with trouble with ColdFusion and extraneous whitespace. And yes, I've done my Google searching. The problem is that I'm trying to output an XML file, and it's crucial that there not be any whitespace before the declaration. An extremely simplified likeness of my ColdFusion script (with line numbers, lest e-mail word-wrapping confuse you) is thus: 1 2 3 4 5 6 7 http://www.foo.com/bar.dtd";> 8 9 10 11 So this page shows an HTML page with a form on it by default, and if the form is submitted, it spits out XML. As you can see, I'm trying at least two different ways to eliminate CF's whitespace: the SuppressWhitespace and EnableCFOutputOnly. The problem is that this is what I get from this simplified script (the problem is the same in my big one): http://www.foo.com/bar.dtd";> You'll note the extra space before the http://www.foo.com/bar.dtd";> Much to my surprise, the output of this file (with the proper URL inputs) is: 1 http://www.foo.com/bar.dtd";> Which means the space is being added *before* any of my whitespace-suppressing measures. All of which just annoys the heck out of me. Sure, I can go in and manually delete that space, but I shouldn't *have* to. Are there any wise warriors out there that could help here? To my knowledge, we're running ColdFusion 4.0 on the server, although I only recently inherited this project, and I'm not sure. Thanks, Todd ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
Re: whitespace woes
What is in the Application.cfm file doing to you? Could the whitespace get added in there? Jerry Johnson >>> [EMAIL PROTECTED] 10/24/02 03:13PM >>> I'm having with trouble with ColdFusion and extraneous whitespace. And yes, I've done my Google searching. The problem is that I'm trying to output an XML file, and it's crucial that there not be any whitespace before the declaration. An extremely simplified likeness of my ColdFusion script (with line numbers, lest e-mail word-wrapping confuse you) is thus: 1 2 3 4 5 6 7 http://www.foo.com/bar.dtd";> 8 9 10 11 So this page shows an HTML page with a form on it by default, and if the form is submitted, it spits out XML. As you can see, I'm trying at least two different ways to eliminate CF's whitespace: the SuppressWhitespace and EnableCFOutputOnly. The problem is that this is what I get from this simplified script (the problem is the same in my big one): http://www.foo.com/bar.dtd";> You'll note the extra space before the http://www.foo.com/bar.dtd";> Much to my surprise, the output of this file (with the proper URL inputs) is: 1 http://www.foo.com/bar.dtd";> Which means the space is being added *before* any of my whitespace-suppressing measures. All of which just annoys the heck out of me. Sure, I can go in and manually delete that space, but I shouldn't *have* to. Are there any wise warriors out there that could help here? To my knowledge, we're running ColdFusion 4.0 on the server, although I only recently inherited this project, and I'm not sure. Thanks, Todd ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
Re: whitespace woes
Try wrapping the entire thing in a cfsavecontent tag and then trim the output: http://www.foo.com/bar.dtd";> #TRIM(XMLOUTPUT# At 02:13 PM 24/10/02 -0500, you wrote: >I'm having with trouble with ColdFusion and extraneous whitespace. And >yes, I've done my Google searching. > >The problem is that I'm trying to output an XML file, and it's crucial >that there not be any whitespace before the >declaration. > >An extremely simplified likeness of my ColdFusion script (with line >numbers, lest e-mail word-wrapping confuse you) is thus: > >1 ENABLECFOUTPUTONLY="Yes" SHOWDEBUGOUTPUT="No"> >2 >3 >4 >5 >6 >7 http://www.foo.com/bar.dtd";> >8 >9 >10 >11 > >So this page shows an HTML page with a form on it by default, and if the >form is submitted, it spits out XML. > >As you can see, I'm trying at least two different ways to eliminate CF's >whitespace: the SuppressWhitespace and EnableCFOutputOnly. > >The problem is that this is what I get from this simplified script (the >problem is the same in my big one): > >http://www.foo.com/bar.dtd";> > > >You'll note the extra space before the annoying. > >In an attempt to discover why all my attempts at suppressing excess >whitespace failed, I inserted random characters to find out at what point >ColdFusion was inserting that space. A simplified version follows (note the >extra "1" on the first line): > >1ENABLECFOUTPUTONLY="Yes" SHOWDEBUGOUTPUT="No"> > > > > >http://www.foo.com/bar.dtd";> > > > > > >Much to my surprise, the output of this file (with the proper URL inputs) >is: >1 >http://www.foo.com/bar.dtd";> > > >Which means the space is being added *before* any of my >whitespace-suppressing measures. > >All of which just annoys the heck out of me. Sure, I can go in and >manually delete that space, but I shouldn't *have* to. > >Are there any wise warriors out there that could help here? To my >knowledge, we're running ColdFusion 4.0 on the server, although I only >recently inherited this project, and I'm not sure. > >Thanks, >Todd > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
Re: whitespace woes
Just for the record, CFMX does not add the space. I had some problems recently developing something on CFMX and uploading to a CF5 server. : grumbles: What you may want to try is to generate everything as a variable and then output the variable. I'm not sure if this will help with the extra space problem, though. You may want to see if cfsilent is supported on your version. I believe it was introduced in CF5, though and does not exist in CF45. At 02:13 PM 10/24/2002 -0500, you wrote: >I'm having with trouble with ColdFusion and extraneous whitespace. And >yes, I've done my Google searching. > >The problem is that I'm trying to output an XML file, and it's crucial >that there not be any whitespace before the >declaration. > >An extremely simplified likeness of my ColdFusion script (with line >numbers, lest e-mail word-wrapping confuse you) is thus: > >1 ENABLECFOUTPUTONLY="Yes" SHOWDEBUGOUTPUT="No"> >2 >3 >4 >5 >6 >7 http://www.foo.com/bar.dtd";> >8 >9 >10 >11 > >So this page shows an HTML page with a form on it by default, and if the >form is submitted, it spits out XML. > >As you can see, I'm trying at least two different ways to eliminate CF's >whitespace: the SuppressWhitespace and EnableCFOutputOnly. > >The problem is that this is what I get from this simplified script (the >problem is the same in my big one): > >http://www.foo.com/bar.dtd";> > > >You'll note the extra space before the annoying. > >In an attempt to discover why all my attempts at suppressing excess >whitespace failed, I inserted random characters to find out at what point >ColdFusion was inserting that space. A simplified version follows (note the >extra "1" on the first line): > >1ENABLECFOUTPUTONLY="Yes" SHOWDEBUGOUTPUT="No"> > > > > >http://www.foo.com/bar.dtd";> > > > > > >Much to my surprise, the output of this file (with the proper URL inputs) >is: >1 >http://www.foo.com/bar.dtd";> > > >Which means the space is being added *before* any of my >whitespace-suppressing measures. > >All of which just annoys the heck out of me. Sure, I can go in and >manually delete that space, but I shouldn't *have* to. > >Are there any wise warriors out there that could help here? To my >knowledge, we're running ColdFusion 4.0 on the server, although I only >recently inherited this project, and I'm not sure. > >Thanks, >Todd > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
Re: whitespace woes
Try this: 1 http://www.foo.com/bar.dtd";> 2 3 4 5 It's ugly, but it seems to work pretty well - it's the carriage returns that end up generating the whitespace. Ian > > So this page shows an HTML page with a form on it by default, and if the > form is submitted, it spits out XML. > > As you can see, I'm trying at least two different ways to eliminate CF's > whitespace: the SuppressWhitespace and EnableCFOutputOnly. > > The problem is that this is what I get from this simplified script (the > problem is the same in my big one): > > http://www.foo.com/bar.dtd";> > > > You'll note the extra space before the annoying. > > In an attempt to discover why all my attempts at suppressing excess > whitespace failed, I inserted random characters to find out at what point > ColdFusion was inserting that space. A simplified version follows (note the > extra "1" on the first line): > > 1 ENABLECFOUTPUTONLY="Yes" SHOWDEBUGOUTPUT="No"> > > > > > > http://www.foo.com/bar.dtd";> > > > > > > Much to my surprise, the output of this file (with the proper URL inputs) > is: > 1 > http://www.foo.com/bar.dtd";> > > > Which means the space is being added *before* any of my > whitespace-suppressing measures. > > All of which just annoys the heck out of me. Sure, I can go in and > manually delete that space, but I shouldn't *have* to. > > Are there any wise warriors out there that could help here? To my > knowledge, we're running ColdFusion 4.0 on the server, although I only > recently inherited this project, and I'm not sure. > > Thanks, > Todd > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
Re: whitespace woes
Quick shot in the dark (I have a meeting to run to) but I think that having the CFOUTPUT on a line of it's own could be causing your problem. Try something like this: Instead of : Let me know if that works (or at least cuts down on your whitespace). Remember, the ENABLECFOUTPUTONLY is doing exactly what you told it to do... it's putting in that CR right after the . ;-) -Novak - Original Message - From: "Will Stalder" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, October 24, 2002 12:13 PM Subject: whitespace woes > I'm having with trouble with ColdFusion and extraneous whitespace. And > yes, I've done my Google searching. > > The problem is that I'm trying to output an XML file, and it's crucial > that there not be any whitespace before the > declaration. > > An extremely simplified likeness of my ColdFusion script (with line > numbers, lest e-mail word-wrapping confuse you) is thus: > > 1 ENABLECFOUTPUTONLY="Yes" SHOWDEBUGOUTPUT="No"> > 2 > 3 > 4 > 5 > 6 > 7 http://www.foo.com/bar.dtd";> > 8 > 9 > 10 > 11 > > So this page shows an HTML page with a form on it by default, and if the > form is submitted, it spits out XML. > > As you can see, I'm trying at least two different ways to eliminate CF's > whitespace: the SuppressWhitespace and EnableCFOutputOnly. > > The problem is that this is what I get from this simplified script (the > problem is the same in my big one): > > http://www.foo.com/bar.dtd";> > > > You'll note the extra space before the annoying. > > In an attempt to discover why all my attempts at suppressing excess > whitespace failed, I inserted random characters to find out at what point > ColdFusion was inserting that space. A simplified version follows (note the > extra "1" on the first line): > > 1 ENABLECFOUTPUTONLY="Yes" SHOWDEBUGOUTPUT="No"> > > > > > > http://www.foo.com/bar.dtd";> > > > > > > Much to my surprise, the output of this file (with the proper URL inputs) > is: > 1 > http://www.foo.com/bar.dtd";> > > > Which means the space is being added *before* any of my > whitespace-suppressing measures. > > All of which just annoys the heck out of me. Sure, I can go in and > manually delete that space, but I shouldn't *have* to. > > Are there any wise warriors out there that could help here? To my > knowledge, we're running ColdFusion 4.0 on the server, although I only > recently inherited this project, and I'm not sure. > > Thanks, > Todd > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com