| | |
SSI and CGI : Capture a value?
Please support our ColdFusion advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
This isn't an SSI or a CGI board, but I hear ColdFusion is quite SSI related, and it's the best place for this question I hope.
I'm wondering if it's possible to do something like this:
"html" page (actually XSL transformed XML page) has an SSI #include or #exec, then an SSI #if statement that does "something" based on a computation in the CGI...
Here's my questions with relation to that..
If I nest SSI functions will they be called in child > parent order or parent > child order? Can I read/write form/environment parameters in the CGI and read them back in the SSI #if?
I may have no need to do this eventually, but I only want my target modder-base to need to alter XSL files (to change style etc) and not look at CGI scripts... CSS is ok but not quite good enough, and I don't want to "read" XSL files in the CGI to simulate seamlessness...
Any helper will get big shouts on my new site!
^_-
Matt
I'm wondering if it's possible to do something like this:
"html" page (actually XSL transformed XML page) has an SSI #include or #exec, then an SSI #if statement that does "something" based on a computation in the CGI...
Here's my questions with relation to that..
If I nest SSI functions will they be called in child > parent order or parent > child order? Can I read/write form/environment parameters in the CGI and read them back in the SSI #if?
I may have no need to do this eventually, but I only want my target modder-base to need to alter XSL files (to change style etc) and not look at CGI scripts... CSS is ok but not quite good enough, and I don't want to "read" XSL files in the CGI to simulate seamlessness...
Any helper will get big shouts on my new site!^_-
Matt
Plato forgot the nullahedron..
It was very simple actually. I didn't need to use SSI #ifs atall! The file gets parsed before the XSLT does any work, so:
works just fine, because by the time the template is called, the user's id number (or -1) for null is in that variable. Pretty cool, pretty cool. I have a custom MIME type "SSIXSL" to avoid parsing every XSL file every time...
XSL is pretty fantastic.
ColdFusion Syntax (Toggle Plain Text)
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="<a rel="nofollow" class="t" href="http://www.w3.org/1999/XSL/Transform" target="_blank">http://www.w3.org/1999/XSL/Transform</a>" version="1.0"> <xsl:template name="logincontrols"> <xsl:variable name="userID"><!--#include virtual="../../cgi/sustain.cgi"--></xsl:variable> <xsl:choose> <xsl:when test="$userID = '-1'"> [Display some login-related info here] </xsl:when> <xsl:otherwise> [Display some user-specific info here] </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet>
works just fine, because by the time the template is called, the user's id number (or -1) for null is in that variable. Pretty cool, pretty cool. I have a custom MIME type "SSIXSL" to avoid parsing every XSL file every time...
XSL is pretty fantastic.
Plato forgot the nullahedron..
![]() |
Similar Threads
- What's a good screen capture tool ? (Geeks' Lounge)
- learning php (PHP)
- CGI, Tomcat, Perl, not compiling Perl code? (Perl)
- CGI, without going anywhere? (Perl)
- Amazing Free! Hosting, 100MB-2GB + phpMyadmin, SSI,Pop3 the works (Web Hosting Deals)
- another newbie with alot of redhat and apache server Q'S (Linux Servers and Apache)
- Image capture into HTML/IE and Oracle databases... (Oracle)
- help with cgi (Linux Servers and Apache)
Other Threads in the ColdFusion Forum
- Previous Thread: Navigate back to Search Results
- Next Thread: Personal preferance question
| Thread Tools | Search this Thread |
Tag cloud for ColdFusion






