d4e974 | 2000-02-24 | Martin Nilsson | |
|
d67471 | 2000-01-26 | Martin Nilsson | |
|
b3281f | 2000-09-10 | Martin Nilsson | | constant cvs_version = "$Id: newstyle_fnord.pike,v 1.8 2000/09/10 16:42:10 nilsson Exp $";
|
d67471 | 2000-01-26 | Martin Nilsson | |
|
6aae86 | 2000-07-02 | Martin Nilsson | | constant thread_safe=1;
|
d67471 | 2000-01-26 | Martin Nilsson | |
|
681f72 | 2000-08-01 | Johan Sundström | |
|
d67471 | 2000-01-26 | Martin Nilsson | | inherit "module";
class TagFnord {
inherit RXML.Tag;
constant name = "fnord";
|
89034d | 2000-07-17 | Martin Nilsson | | mapping(string:RXML.Type) opt_arg_types = ([ "alt" : RXML.t_text(RXML.PEnt) ]);
|
d67471 | 2000-01-26 | Martin Nilsson | |
class Frame {
inherit RXML.Frame;
array do_enter(RequestID id) {
if(id->prestate->fnord)
|
867cee | 2000-03-31 | Martin Nilsson | | do_iterate=0;
|
d67471 | 2000-01-26 | Martin Nilsson | | else {
if(args->alt)
result=args->alt;
|
867cee | 2000-03-31 | Martin Nilsson | | do_iterate=-1;
|
d67471 | 2000-01-26 | Martin Nilsson | | }
return 0;
}
int do_iterate;
}
}
|
b3281f | 2000-09-10 | Martin Nilsson | | constant module_type = MODULE_TAG;
|
d67471 | 2000-01-26 | Martin Nilsson | | constant module_name = "Newstyle Fnord!";
constant module_doc = "Adds an extra container tag, <fnord> that's supposed to make "
"things invisible unless the \"fnord\" prestate is present."
"<p>This module is here as an example of how to write a "
"very simple newstyle RXML-parsing module.</p>";
|
681f72 | 2000-08-01 | Johan Sundström | |
#include <module.h>
|
d67471 | 2000-01-26 | Martin Nilsson | | TAGDOCUMENTATION;
#ifdef manual
constant tagdoc=(["fnord":#"<desc cont>The fnord container tag hides its "
"contents for the user, unless the fnord prestate is used.</desc>"
"<attr name=alt value=string>An alternate text that should be written "
"in place of the hidden text.</attr>"]);
#endif
|