Branch: Tag:

2000-02-15

2000-02-15 07:53:45 by Martin Stjernholm <mast@lysator.liu.se>

Added kludge function TagSet.call_prepare_funs() used by
rxml.pike.do_parse(). Don't start a recursive parser when the content
is empty.

Rev: server/etc/modules/RXML.pmod/module.pmod:1.60

2:   //!   //! Created 1999-07-30 by Martin Stjernholm.   //! - //! $Id: module.pmod,v 1.59 2000/02/15 06:06:09 mast Exp $ + //! $Id: module.pmod,v 1.60 2000/02/15 07:53:45 mast Exp $      //! Kludge: Must use "RXML.refs" somewhere for the whole module to be   //! loaded correctly.
441:    {    Context ctx = Context (this_object(), id);    if (!prepare_funs) prepare_funs = get_prepare_funs(); -  prepare_funs -= ({0}); -  prepare_funs (ctx); +  (prepare_funs -= ({0})) (ctx);    return ctx->new_parser (top_level_type);    }   
495:    return funs;    }    +  void call_prepare_funs (Context ctx) +  // Kludge function used from rxml.pike. +  { +  if (!prepare_funs) prepare_funs = get_prepare_funs(); +  (prepare_funs -= ({0})) (ctx); +  } +     static mapping(string:mapping(string:Tag)) plugins = ([]);       /*static*/ void low_get_plugins (string prefix, mapping(string:Tag) res)
1751:    ENTER_SCOPE (ctx, this);       for (; iter > 0; iter--) { -  if (raw_content) { // Got nested parsing to do. +  if (raw_content && raw_content != "") { // Got nested parsing to do.    int finished = 0;    if (!subparser) { // The nested content is not yet parsed.    subparser = content_type->get_parser (