Branch: Tag:

2001-08-24

2001-08-24 20:49:44 by Martin Stjernholm <mast@lysator.liu.se>

Don't report rxml errors in the content of <set>. Fixed <define> to
handle the magic _debug_ argument consistently (it can now be given as
an <attrib> to enable debug in the defined tag wherever it is used).

Rev: server/modules/tags/rxmltags.pike:1.282

7:   #define _rettext RXML_CONTEXT->misc[" _rettext"]   #define _ok RXML_CONTEXT->misc[" _ok"]    - constant cvs_version = "$Id: rxmltags.pike,v 1.281 2001/08/23 23:34:48 mast Exp $"; + constant cvs_version = "$Id: rxmltags.pike,v 1.282 2001/08/24 20:49:44 mast Exp $";   constant thread_safe = 1;   constant language = roxen->language;   
458:    mapping(string:RXML.Type) opt_arg_types = ([ "type": RXML.t_type(RXML.PEnt) ]);    RXML.Type content_type = RXML.t_any (RXML.PXml);    array(RXML.Type) result_types = ({RXML.t_nil}); // No result. -  int flags; +  int flags = RXML.FLAG_DONT_RECOVER;       class Frame {    inherit RXML.Frame;
2410:    // RXML.Context.misc we can get the current definition even if it    // changes in loops etc.    -  void create(string _name, int tag) { +  void create(string _name, int moreflags) {    if (_name) {    name=_name;    lookup_name = "tag\0" + name; -  if(tag) flags |= RXML.FLAG_EMPTY_ELEMENT; +  flags |= moreflags;    }    }   
2523:   class TagDefine {    inherit RXML.Tag;    constant name = "define"; -  constant flags = RXML.FLAG_DONT_REPORT_ERRORS; +  constant flags = RXML.FLAG_DONT_RECOVER;    RXML.Type content_type = RXML.t_xml (RXML.PXml);    array(RXML.Type) result_types = ({RXML.t_nil}); // No result.   
2561: Inside #if ROXEN_COMPAT <= 1.3
  #if ROXEN_COMPAT <= 1.3    n = id->conf->old_rxml_compat?lower_case(n):n;   #endif -  int tag=0; +  int moreflags=0;    if(args->tag) { -  tag=1; +  moreflags = RXML.FLAG_EMPTY_ELEMENT;    m_delete(args, "tag");    } else    m_delete(args, "container");
2622:    m_delete (args, "trimwhites");    }    + #ifdef DEBUG +  if (defaults->_debug_) { +  moreflags |= RXML.FLAG_DEBUG; +  m_delete (defaults, "_debug_"); +  } + #endif +    #if ROXEN_COMPAT <= 1.3    if(id->conf->old_rxml_compat)    content = replace( content, indices(args), values(args) );
2634:    UserTag user_tag;    if ((oldtagdef = ctx->misc[lookup_name]) &&    !((user_tag = oldtagdef[3])->flags & RXML.FLAG_EMPTY_ELEMENT) == -  !tag) // Redefine. +  !(moreflags & RXML.FLAG_EMPTY_ELEMENT)) // Redefine.    ctx->misc[lookup_name] = ({def, defaults, args->scope, user_tag});    else { -  user_tag = UserTag (n, tag); +  user_tag = UserTag (n, moreflags);    ctx->misc[lookup_name] = ({def, defaults, args->scope, user_tag});    ctx->add_runtime_tag(user_tag);    }