d4e974 | 2000-02-24 | Martin Nilsson | |
|
d67471 | 2000-01-26 | Martin Nilsson | |
|
79ca87 | 2000-11-24 | Per Hedbor | | constant cvs_version = "$Id: newstyle_fnord.pike,v 1.9 2000/11/24 16:50:37 per 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";
|
79ca87 | 2000-11-24 | Per Hedbor | |
#include <module.h>
#define LOCALE(X,Y) _DEF_LOCALE("mod_fnord",X,Y)
|
d67471 | 2000-01-26 | Martin Nilsson | |
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;
|
79ca87 | 2000-11-24 | Per Hedbor | | LocaleString module_name_locale = LOCALE(0,"Newstyle Fnord!");
LocaleString module_doc_locale =
LOCALE(0,"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>");
|
d67471 | 2000-01-26 | Martin Nilsson | |
|
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
|