Brendan Ganning wrote:
However, how do I pass all of the attributes?

I could either
   A) Create 3 more regular expressions to find the values of refId,
refType, and class (not a big fan of this)
   B) Create a url string to pass to an include
   C) Create an attribute collection to pass into a cfmodule.

  
I'm not sure it would work in this situation (and I haven't used it in so long I'm not even sure if its available), but have you looked into using the xml parser to find the values?  
Problems with B:
   I have successfully set myQryString =
"refId=1&refType=activity&class=tr".
   When processing the statement <cfinclude
template="getRef.cfm?#myQryString#"> I receive an error cannot find
page.
   I have also tried getRef.cfm?x=&#myQryString# still no go.
   But, if I were to try <cfinclude
template="getRef.cfm?refId=1&refType=activity&class=tr"> this works, but
my values are hard coded.

  
I cannot even get hard coded values like you have to find the template (get the same error as you mentioned for using #myQryString#).  Have you tried perhaps setting

<cfset cgi.query_string=cgi.query_string & "&#myQueryString#" >

and then just including the template?  Those values should still be available then... Of course, I've never tried it, but it could work!  And if that doesn't work, you could always just set them explicitly before calling the template.


Problems with C:
   Similar issue. I can set myQryString =
"refId=1&refType=activity&class=tr" and call <cfmodule
template="getRef.cfm" myQryString="#myQryString#">
   But this leaves me having to write some sort of regex to parse the
attributes on the calling page.  Ideally in this case I would like to
send an attribute collection.

The biggest issue is that I end up having a string that is a queryString
or 'refId="1" refType="activity" class="tr"'. Which I need to convert
into 3 variables.  I know this should be so easy, and I am embarassed to
ask for help on this one, but I am at a loss. Thanks Peter and Sammy for
your previous help.

Brendan

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On
Behalf Of Sammy Larbi
Sent: Monday, July 17, 2006 11:25 AM
To: [email protected]
Subject: Re: [CFCDev] Coldfusion and XSLT Transformation

Sorry about my last post - I suggested the same thing but hadn't yet
read this one. (Was doing research for too long before downloading the
new messages). 

Peter Bell wrote:
  
Hi Brendan,

You've got to love management!!!

Only other thought - could you Regex through the recordset. If you 
find the right matching text, include using a switch case. Wrap that 
in a save content and then use a regex to replace your tag with the 
value stored in your save content. A bit cludgy, but it MIGHT be
    
another approach . . .
  
Good luck!

Best Wishes,
Peter

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On 
Behalf Of Brendan Ganning
Sent: Monday, July 17, 2006 11:20 AM
To: [email protected]
Subject: RE: [CFCDev] Coldfusion and XSLT Transformation


Hi Peter,

I know exactly what you mean.  I have suggested a publish function 
which would write out all static pages, as well as the creation of a
    
temp page.
  
Both ideas were shot down.  I may end up doing the temp page if I 
cannot find a better solution.  Thanks for the input.

Brendan

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On 
Behalf Of Peter Bell
Sent: Monday, July 17, 2006 10:03 AM
To: [email protected]
Subject: RE: [CFCDev] Coldfusion and XSLT Transformation

Hi Brendan,

Probably not a very helpful suggestion, but is there any way you can 
get around this approach? It sucks!!!

Are you really going to be importing data and exporting data using XML
    

  
as frequently as you will be serving up page views (i.e. hopefully 
hundreds to tens of thousands of times a day)?! If not, why use XML 
within the application? It would be much easier to write a simple XML 
import/export engine in CF for porting data when required - exposable 
as a web service if necessary.

One approach to processing returned CF commands from queries is saving
    

  
them to file and then running the file (not as bad as it sounds if 
you're running a caching mechanism so you're not creating the file for
    
every page request).
  
I've got to say though, with no knowledge of your specific use cases 
the approach of storing data as XML native objects just seems like 
it's going to cause you a world of pain.

Sorry. I usually don't like people that, when asked "how do I do X" 
say "Don't do X", but unless you've got a really special use case I'd 
think it over a few times and see if I could get away from this
    
approach.
  
Best Wishes,
Peter
 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On 
Behalf Of Brendan Ganning
Sent: Monday, July 17, 2006 10:55 AM
To: [email protected]
Subject: [CFCDev] Coldfusion and XSLT Transformation


We have just started using a SQL Server 2005 database with our CF MX 7
    

  
server. I have been instructed to set up an application that uses the 
native XML datatype in SQL Server so that we will be able to port 
information when needed to other platforms.

Here is the question.

In our xml field we have an element named reference. 
<reference refId="1" refType="activity"></reference>

If the reference is of refType text, or image, it is quite easy to 
have the sql server return the generated html that is required.  
However, when I have a refType of activity, I need to cfinclude a 
page, or run a custom tag. If I have sql return the tag to be put into
    
the html ie(<cf_getReference id="1"
  
type="activity">), the coldfusion server will not process the tag 
since it is contained in the query return.  If I have coldfusion do 
the transformation, I have a feeling that the coldfusion server will 
produce a longer load time and would then be needed in all platforms 
to do the transformation.  Any suggestions?

Thanks,
Brendan
    


----------------------------------------------------------
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).

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).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to