This is an old thread but here are some tips for the benefit of those who generate SVG using ColdFusion.
The svg generated by your .cfm should be well-formed xml. If you take a valid svg file and find out that it is no longer one when served by CF, then pay attention to the following: - If it starts with the xml processing instruction (i.e. <?xml ...> ), then it should be the first line in the generated output. Typically CF adds blank lines during processing which can be prevented by preceeding the xml pi with cfcontent: <cfcontent type="image/svg-xml" reset="Yes"><?xml version="1.0" standalone="no"?> [Note that they are both on the same line] - If you are in debugging mode, debugging output is appended to the output of your SVG generating template as well, breaking the well-formedness of your SVG XML. Remember to disable debugging for that template: <cfsetting showDebugOutput="No"> -If you have a MIME type issue, cfcontent can fix it (as in above): <cfcontent type="image/svg-xml" reset="Yes"> Here's Lincoln's sample modified in accordance with the above: <cfsetting showDebugOutput="No"> <cfcontent type="image/svg-xml" reset="Yes"><?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <svg > <rect width="100" height="100"/> </svg> Ayhan Ergul --- In [email protected], "Mitchell, Lincoln L." <[EMAIL PROTECTED]> wrote: > I had problems getting coldfusion to generated an SVG file direct in the browser on some PC's so I used a HTML to embed the svg.cfm. However the SVG could not have the 1st line "<?xml version="1.0"?>" only the 'DOCTYPE' line. > > Example: > > In the HTML page put: > <embed src="svg.cfm" width="100%" height="100%" type="image/svg+xml"/> > > In the SVG out: > <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> > <svg > > <rect width="100" height="100"/> > </svg> > > Don't forget to serve the page to the browser via the coldfusion server. > > Hope this helps > > Linc > > -----Original Message----- > From: Mike Kidson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 2 July 2003 7:41 AM > To: [email protected] > Cc: [EMAIL PROTECTED] > Subject: [svg-developers] Cold Fusion and SVG > > I'd like to throw this customer question to the list and jd if I may... > > Would any Cold Fusion scientists care to respond? > > > I am using VML with Cold fusion and it is trivial to intermix VML > > with Cold Fusion and HTML as one big incestuous family of code. > > I cannot (easily) intermix SVG with CFM code. The cold fusion > > interpreter seems to pretty much ignore it. Is there a > > work-around? > > > Thank you, > > Mike Kidson > Software Mechanics > > > ----- > To unsubscribe send a message to: [EMAIL PROTECTED] > -or- > visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" > ---- > > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ > > > > > ================================================== ================================================== ====================== > This email was received from the Internet. If this email is unsolicited, non-business related, inappropriate or spam, please forward it to [EMAIL PROTECTED] Please do not reply or unsubscribe to spam as this may confirm your email address to the spammer. ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

