I am not sure that would work for one big reason:Isolated variable scopes.
Take the following code for example:

/////////////////////////////
<CFSET VARIABLES.Name="~.netł">
    <CF_FRAME>
        <PRE>
            VARIABLES.Name:#VARIABLES.Name#
        </PRE>
</CF_FRAME>
/////////////////////////////

Clearly, there is no CFOUTPUT and the body will display as
"VARIABLES.Name:#VARIABLES.Name#".  The VARIABLES scope is available to this
page though.  When the tag set is called, it will open a 'new' VARIABLES
scope and will not inherit the variable "VARIABLES.Name" UNLESS I pass it as
a parameter.

So, I wrote a file named FRAME.cfm with the following code:

//////////////////////////////
<CFSETTING ENABLECFOUTPUTONLY="YES">
<CFIF ThisTag.HasEndTag eq "TRUE">
    <CFIF ThisTag.ExecutionMode EQ "start">

        <CFOUTPUT>
            Start:#ThisTag.GeneratedContent#
        </CFOUTPUT>
    <CFELSE>

        <CFSET
VARIABLES.First_Pound_Location=FIND("##",ThisTag.GeneratedContent)>
        <CFSET
VARIABLES.Second_Pound_Location=FIND("##",ThisTag.GeneratedContent,VARIABLES
.First_Pound_Location+1)>
        <CFSET
VARIABLES.Explression_To_Evaluate=MID(ThisTag.GeneratedContent,VARIABLES.Fir
st_Pound_Location+1,VARIABLES.Second_Pound_Location-VARIABLES.First_Pound_Lo
cation-1)>

        <CFOUTPUT>

VARIABLES.First_Pound_Location:#VARIABLES.First_Pound_Location#<BR>

VARIABLES.Second_Pound_Location:#VARIABLES.Second_Pound_Location#<BR>

VARIABLES.Explression_To_Evaluate:#VARIABLES.Explression_To_Evaluate#<BR>

            <HR>
                ##Evaluate(#VARIABLES.Explression_To_Evaluate#))## Yields:
            <HR>
                <CFTRY>
                    #Evaluate(VARIABLES.Explression_To_Evaluate)#
                    <CFCATCH>
                        <FONT COLOR="NAVY" SIZE="2">
                        Type:<I>#CFCATCH.TYPE#</I><BR>
                        Message:<I>#CFCATCH.MESSAGE#</I><BR>
                        </FONT>
                    </CFCATCH>
                </CFTRY>

            End:#ThisTag.GeneratedContent#</CFOUTPUT>
    </CFIF>
</CFIF>

<CFSETTING ENABLECFOUTPUTONLY="NO">
//////////////////////////////

To see this runnign, goto http://WWW.CFAPOSTLE.COM/TESTS/TAGSETS/PAGE.CFM
.   Not the prettiest or most efficient, but should be easy to understand.

A little known attribute of the tag set is that the FORM scope Does pass
without being turned into an attribute.  Which menas that if I create
FORM.Name and I do not pass it as an attribute on the tag set, you can still
se and use it in the tag though the scopes are 'isolated'.

So, Though it may be possible to use Regular Expressions to isolate the
unparsed sections of the ThisTag.GeneratedContent, the variables that need
to be evaluated are largely unavailable.

~.netł


> > For example Search for the First # then the second # and between this do
> > an evaluate on the variable found between them.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to