CGI Engine - Success and Failure

Jim jimc at ace-pb.com
Wed Mar 3 19:46:30 EST 2004


Well, after giving up some blood, sweat, and tears, I was finally able 
to get the Darwin Rev CGI engine to work. Having browsed the archives I 
saw much reference to "just use the MC engine", but I wanted to use the 
Rev engine after I read in Sample Stacks/Intro to Rev CGIs/Presentation 
Notes/CGI Outline.pdf where it states "Revolution now has database 
functionality built into the CGI engine. All the revdb and revxml 
commands are supported."

This got the juices flowing and prompted me to go through the process 
of getting the engine to work (a long story in itself).
But, I've found this not to be true. Very few of the xml functions 
work. Out of the ones I've tested...

What works:
* revCreateXMLTree() - Returns a number of 1, as expected, since it is 
a fresh run in memory each time.
* revXMLRootNode() - Returns the root node, as expected.
* revXMLText(treeID,rootNode) - Seems to work, but I get a different 
formatting of data between CGI engine and normal Rev app (note, must 
include both params).
* revXMLTrees() - Returns a number of 1, as expected. Have not tested 
with creating more than one tree in same call.

What doesn't work:
* revXMLtree - Only returns the root node, no matter what the depth is 
set at.
* revXMLFirstChild - Returns empty
* revXMLChildNames - Returns empty
* revXMLNodeContents - Returns empty when using the root node, or 
"xmlerr, can't find element" when manually plugging in a valid node 
path.
* revXMLText(treeID) - xmlerr, invalid number of arguments (Docs read 
that second param "startNode" is optional. This error is given when 
only the treeID param is supplied)

I haven't tried any of the other functions or commands, since with this 
list of broken functions using the others would be pointless.

All of these were tested by using the same scripts in a stack in the 
IDE.

Perhaps this has to do with being the Darwin CGI engine found in the 
2.0 folder at the FTP site? I've been through every folder in there, 
and the only other thing I can find is the mc engine.

Is there a 2.1.2 CGI engine which addresses these issues that's not 
posted in the FTP site, maybe?

Jim.


More information about the use-livecode mailing list