Has anyone ever seen an Abstract Syntax Notation for CF? Macromedia has never published one as far as I know. Until there is a formal syntax notation for CF, comparing it to other languages will always be unsatisfactory. An interesting puzzle is that a DTD is an abstract notation for an XML application; so can a DTD be written for CF? If not, can CF ever be XML? And upon reflection, why should CF be like XML? What is the benefit?

Joseph


At 12:13 PM 7/29/2005, you wrote:
> Better be careful with custom tags. The following are *not* equivalent:
>
>     <cf_myCustomTag>
>
>     <cf_myCustomTag/>
>
> The first one gets invoked only once (in start mode); the second gets
> invoked twice (in start and end modes).

That depends on how the tag is coded. If the custom tag contains <cfexit
method="EXITTAG">, then it only gets invoked once. In which case, both calls
are equivalent.

Anyway, as I already noted, "the only exceptions I make are for poorly coded
tags that haven't been properly coded to handle the end tag execution
state." Obviously, I try to avoid using such tags wherever possible.

Ben Rogers
http://www.c4.net
v.508.240.0051
f.508.240.0057

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Vince Bonfanti
> Sent: Friday, July 29, 2005 10:08 AM
> To: [email protected]
> Subject: RE: [CFCDev] WOT: CFML as XML
>
> Better be careful with custom tags. The following are *not* equivalent:
>
>     <cf_myCustomTag>
>
>     <cf_myCustomTag/>
>
> The first one gets invoked only once (in start mode); the second gets
> invoked twice (in start and end modes).
>
> Vince
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Ben Rogers
> > Sent: Thursday, July 28, 2005 8:04 PM
> > To: [email protected]
> > Subject: RE: [CFCDev] WOT: CFML as XML
> >
> > > Especially when reading a cfmodule. (bad, I know. Not my code).
> >
> > I would argue that all custom tag calls, whether they are
> > made with the cfmodule tag, using cfimport or cf_tagName
> > syntax, should either include a closing tag or use the XML
> > style trailing slash. Doing so clears up a lot of ambiguity.
> > The only exceptions I make are for poorly coded tags that
> > haven't been properly coded to handle the end tag execution state.
> >
> > That said, in all other cases, I prefer not to use the XML
> > style trailing slash because it serves no purpose.
> >
> > Ben Rogers
> > http://www.c4.net
> > v.508.240.0051
> > f.508.240.0057
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> > > Behalf Of Haikal Saadh
> > > Sent: Thursday, July 28, 2005 6:30 PM
> > > To: [email protected]
> > > Subject: Re: [CFCDev] WOT: CFML as XML
> > >
> > > 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 wrote:
> > >
> > > >One point that should be made is that CFML is not XML, no
> > matter how
> > > >it's written.  CFELSE, CFSET and CFRETURN are three
> > examples of tags
> > > >that simply cannot be valid XML.  If you use a subset of CFML, you
> > > >could make for a valid XML document, but you'd be crippled.
> > > >
> > > >This is one interesting feature of recent versions of JSP.  JSP
> > > >documents are valid XML, so you can do some neat things
> > with XSLT and
> > > >such to actually manipulate the code of you app, not just
> > the data it
> > > >manages.
> > > >
> > > >cheers,
> > > >barneyb
> > > >
> > > >On 7/28/05, Spike <[EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > >>I write code that way because it is required when writing XML and
> > > >>valid XHTML. It's simpler for my poor old brain to remember to
> > > >>always do it that way than to do it one way in most tag based
> > > >>languages and another in ColdFusion.
> > > >>
> > > >>It also makes code more readable for me because it is a more
> > > >>declarative style.
> > > >>
> > > >>If I see this:
> > > >>
> > > >><cfhttp url="blah">
> > > >>
> > > >>There may or may not be a </cfhttp> somewhere further
> > down the page,
> > > >>whereas if I see this:
> > > >>
> > > >><cfhttp url="blah" />
> > > >>
> > > >>I know there isn't one.
> > > >>
> > > >>Spike
> > > >>
> > > >>
> > > >>
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Haikal Saadh, Applications Programmer
> > > Teaching and Learning Support Services
> > >
> > > K405, Queensland University of Technology, Kelvin Grove Campus
> > >
> > > [EMAIL PROTECTED], 3864 8633
> > > CRICOS No. 00213J
> > >
> > >
> > >
> > > ----------------------------------------------------------
> > > 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]
> >
> >
> >
> >
> > ----------------------------------------------------------
> > 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]
> >
> >
> >
>
>
>
>
> ----------------------------------------------------------
> 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]




----------------------------------------------------------
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]

-----------------------------------------------------------------------
http://www.switch-box.org/CFSQLTool/Download/

Switch_box                      MediaFirm, Inc.
www.Switch-box.org              Loveland, CO  USA



----------------------------------------------------------
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]


Reply via email to