Roxen.git / server / base_server / rxml.pike

version» Context lines:

Roxen.git/server/base_server/rxml.pike:1:   // The Roxen RXML Parser. See also the RXML Pike modules.   // Copyright © 1996 - 2000, Roxen IS.   //   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.   // New parser by Martin Stjernholm   // New RXML, scopes and entities by Martin Nilsson   // - // $Id: rxml.pike,v 1.276 2001/01/30 00:36:32 nilsson Exp $ + // $Id: rxml.pike,v 1.277 2001/02/01 02:54:18 per Exp $         inherit "rxmlhelp";   #include <request_trace.h>   #include <config.h>      #ifndef manual   #define _stat defines[" _stat"]   #define _error defines[" _error"]   #define _extra_heads defines[" _extra_heads"]
Roxen.git/server/base_server/rxml.pike:1754:   class TagPathplugin   {    inherit RXML.Tag;    constant name = "emit";    constant plugin_name = "path";       array get_dataset(mapping m, RequestID id)    {    string fp = "";    array res = ({}); -  string p = id->not_query; +  string p = m->path || id->not_query;    if( m->trim )    sscanf( p, "%s"+m->trim, p );    if( p[-1] == '/' )    p = p[..strlen(p)-2];    array q = p / "/";    if( m->skip )    q = q[(int)m->skip..]; -  +  if( m["skip-end"] ) +  q = q[..sizeof(q)-((int)m["skip-end"]+1)];    foreach( q, string elem )    {    fp += "/" + elem;    fp = replace( fp, "//", "/" );    res += ({    ([    "name":elem,    "path":fp    ])    });
Roxen.git/server/base_server/rxml.pike:3133: Inside #if defined(manual)
   Postparses its content.</short> Useful when an entity contains    RXML-code. <tag>eval</tag> is then placed around the entity to get    its content parsed.   </desc>",      "emit#path":({ #"<desc plugin><short>    Prints paths.</short> This plugin traverses over all directories in    the path from the root up to the current one.   </desc>    + <attr name='path' value='string'> +  Use this path instead of the document path + </attr> +    <attr name='trim' value='string'>    Removes all of the remaining path after and including the specified    string.   </attr>      <attr name='skip' value='number'>    Skips the 'number' of slashes ('/') specified, with beginning from    the root. -  + </attr> +  + <attr name='skip-end' value='number'> +  Skips the 'number' of slashes ('/') specified, with beginning from +  the end.   </attr>",    ([   "&_.name;":#"<desc ent>    Returns the name of the most recently traversed directory.   </desc>",      "&_.path;":#"<desc ent>    Returns the path to the most recently traversed directory.   </desc>"    ])