Hi all, Been unsubscribed for a bit, trying to be a little less tied to the machine, hahaha... But I'm back in the fray now, learning to use XML in CF for our new in-house framework.
To make it easier for any part of our framework to manipulate the final XHTML output before it's passed back to the browser, we've decided to do something like this at the start of each request: <cfxml variable="request.outputXHTML"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title></title> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> </head> <body> </body> </html> </cfxml> And then we can use the built-in XML functions to manipulate the page as it goes through the framework. Fine. Only problem is, when the code is output with ToString(), the DOCTYPE gets stripped out and an XML declaration is put in its place. I've read that XML declarations cause problems in *some* browsers, so are best left out (http://www.nypl.org/styleguide/xhtml/guidelines.html). I've got to research that more, but even if I say, fine, we'll live with older browsers having problems, we still have the DOCTYPE stripped out. We could output it "manually", then output request.outputXHTML - but the actual XML declaration - if it's there - needs to be on the very first line! Of course we could go back to our idea of building up the page in various structures, but it seems silly to waste all the power of the CF XML Document Object and all the functions... Anyone solved this problem? On a related note, there doesn't seem to be an XML data type for use in CFPARAM or CFPROPERTY. Testing shows that an XML object doesn't pass the "struct" type test (which seemed the most logical stand-in), but does pass as a "string". Obviously this isn't very good, as there are plenty of strings that aren't valid XML! Is this one for the wishlist? Surely one for the "blimey, the should have got that in first time" list ;-) cheers, Gyrus [EMAIL PROTECTED] play: http://norlonto.net/ work: http://tengai.co.uk/ PGP key available ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 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. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4