Roxen.git / server / modules / tags / rxmltags.pike

version» Context lines:

Roxen.git/server/modules/tags/rxmltags.pike:1:   // This is a roxen module. Copyright © 1996 - 2001, Roxen IS.   //      #define _stat RXML_CONTEXT->misc[" _stat"]   #define _error RXML_CONTEXT->misc[" _error"]   #define _extra_heads RXML_CONTEXT->misc[" _extra_heads"]   #define _rettext RXML_CONTEXT->misc[" _rettext"]   #define _ok RXML_CONTEXT->misc[" _ok"]    - constant cvs_version = "$Id: rxmltags.pike,v 1.278 2001/08/22 21:26:53 mast Exp $"; + constant cvs_version = "$Id: rxmltags.pike,v 1.279 2001/08/23 16:42:47 per Exp $";   constant thread_safe = 1;   constant language = roxen->language;      #include <module.h>   #include <config.h>   #include <request_trace.h>   inherit "module";         // ---------------- Module registration stuff ----------------
Roxen.git/server/modules/tags/rxmltags.pike:902:    context->get_var(s, args->scope) );    } ) * "\n");    result += "\n";    }    return result;    }    return String.implode_nicely(sort(context->list_scopes()));    }   }    + class TagInsertLocate { +  inherit RXML.Tag; +  constant name= "insert"; +  constant plugin_name = "locate"; +  +  RXML.Type get_type( mapping args ) +  { +  if (args->quote=="html") +  return RXML.t_text; +  return RXML.t_xml; +  } +  +  string get_data(string var, mapping args, RequestID id) +  { +  array(string) result; +  +  result = VFS.find_above_read( id->not_query, var, id ); +  +  if( !result ) +  RXML.run_error("Cannot locate any file named "+var+".\n"); +  +  return result[1]; +  } + } +    class TagInsertFile {    inherit RXML.Tag;    constant name = "insert";    constant plugin_name = "file";       RXML.Type get_type(mapping args) {    if (args->quote=="html")    return RXML.t_text;    return RXML.t_xml;    }
Roxen.git/server/modules/tags/rxmltags.pike:2242:    if(!args->file && !args->package)    parse_error("No file or package selected.\n");       array res;    string name, filename;    if(args->file)    {    filename = Roxen.fix_relative(args->file, id);    name = id->conf->get_config_id() + "|" + filename;    } +  else if( args->locate ) +  { +  filename = VFS.find_above( id->not_query, args->locate, id, "locate" ); +  name = id->conf->get_config_id() + "|" + filename; +  }    else -  +  {    name = "|" + args->package; -  +  }    RXML.Context ctx = RXML_CONTEXT;       if(args->info || id->pragma["no-cache"] ||    !(res=cache_lookup("macrofiles",name)) ) {       string file;    if(filename)    file = id->conf->try_get_file( filename, id );    else    file = read_package( args->package );