Chain function -vs- Custom Function

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
JeromyNix Offline
Member
Posts: 64
Joined: Dec 2010
Reputation: 1
Post: #1
I'm not really sure what the difference is....

and i've been attempting to program a replacement for scraperxml (which seems to be a dead project) but i'm a bit stumped on the difference between these two types of functions.
find quote
bambi73 Online
Senior Member
Posts: 195
Joined: Jan 2010
Reputation: 0
Location: Czech Republic
Post: #2
Code:
<url function="AAA">BBB</url>
uses BBB as URL and passes content (of that web page) to function AAA in $$1

Code:
<chain function="AAA">BBB</url>
passes BBB directly to function AAA as string in $$1
find quote
JeromyNix Offline
Member
Posts: 64
Joined: Dec 2010
Reputation: 1
Post: #3
Thanks that explained it perfectly
find quote
JeromyNix Offline
Member
Posts: 64
Joined: Dec 2010
Reputation: 1
Post: #4
One more question.

Is there a priority given to chain functions in relation to custom functions after the function calling them has run its course.

In other words
are chain/custom functions executed in the order of occurrence, or is the set of chain functions run before any custom functions or vice-versa?
find quote
budswell Offline
Junior Member
Posts: 31
Joined: Feb 2012
Reputation: 1
Post: #5
Is there are way to pass more than one parameter to a chain function?
Or do I just have to encode them into a string and then split them back out inside the function.
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #6
they are executed in xml order in a depth-first recursion. you have to concat to pass multiple buffers.
(This post was last modified: 2013-04-18 13:50 by spiff.)
find quote