f41b98 | 2009-05-07 | Martin Stjernholm | |
|
d4e974 | 2000-02-24 | Martin Nilsson | |
|
d67471 | 2000-01-26 | Martin Nilsson | |
|
f41b98 | 2009-05-07 | Martin Stjernholm | | constant cvs_version = "$Id: newstyle_fnord.pike,v 1.16 2009/05/07 14:15:54 mast 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";
|
eb73ee | 2003-06-26 | Anders Johansson | |
|
79ca87 | 2000-11-24 | Per Hedbor | | #include <module.h>
|
eb73ee | 2003-06-26 | Anders Johansson | |
#define LOCALE(X,Y) _DEF_LOCALE("mod_newstyle_fnord",X,Y)
|
79ca87 | 2000-11-24 | Per Hedbor | |
|
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;
|
f0d694 | 2001-01-29 | Per Hedbor | | LocaleString module_name = LOCALE(3,"Newstyle Fnord!");
LocaleString module_doc =
|
de9ca8 | 2000-11-27 | Per Hedbor | | LOCALE(4,"Adds an extra container tag, <fnord> that's supposed "
|
79ca87 | 2000-11-24 | Per Hedbor | | "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
|
ce8fb0 | 2001-09-21 | Johan Sundström | | constant tagdoc=(["fnord":#"<desc type='cont'>The fnord container tag hides its "
|
d67471 | 2000-01-26 | Martin Nilsson | | "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
|