<cfset var foo = "bar" /> that is NOT valid XML. HTML had the concept of 'flag' attribute that didn't take a value, but XML (and therefor XHTML) has no such concept.
<cfset foo = 3 /> is not valid XML either, because XML says all values have to be quoted. <cfset foo = "my ""cat"" is tall" /> is not valid XML, because XML uses entities (" in this case) for escaping, not doubling. <cfset foo = "my" & name /> is not valid XML, because the ampersand needs escaping, and the ampersand and 'name' are floating without attribute names. The list of missing things I provided was far from comprehensive, but rather some of the more common examples. Spike say's they're going to solve it for CFE, which will be great, but it's definitely not a trivial problem. cheers, barneyb On 7/28/05, Haikal Saadh <[EMAIL PROTECTED]> wrote: > I favour XML syntax for the same reasons a spike. > > Especially when reading a cfmodule. (bad, I know. Not my code). It's > annoying to have to wonder whether that's it at that stage, or the > cfmodule wraps around other logic. > > It's not goint to take much to make it xml, though: > > Why is cfset not well formed xml? > > <cfset foo="bar" /> is valid, as is > <cfset var foo = "bar" />. var is a valueless attribute. (I forget the > technical term, but they are allowed, like the checked attribute in > certain xhtml form tags) > > cfreturn, then by the above meaning, is also well formed, but it lacks > meaning. Something like <cfreturn value="foo"> would give meaning. > > That leaves cfelse. It could be dropped in favour of something like > JSTL's <choose>. Syntax from memory is something like: > <choose> > <when test="foo"> > <!--- Do stuff ---> > </when> > <when test="bar"> > <!--- Do stuff ---> > </when> > <otherwise> > <!--- Do stuff ---> > </otherwise> > </choose> > -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
