Roxen.git / server / etc / modules / RXML.pmod / utils.pmod

version» Context lines:

Roxen.git/server/etc/modules/RXML.pmod/utils.pmod:1:   //! Things that belong elsewhere but can't lie there for various silly   //! reasons. Everything here is considered internal and not part of   //! the RXML.pmod API.   //!   //! E.g. one reason is to avoid circular references in the parser   //! objects when the callbacks are defined in them.   //!   //! Created 2000-01-21 by Martin Stjernholm   //! - //! $Id: utils.pmod,v 1.28 2001/07/16 14:13:00 mast Exp $ + //! $Id: utils.pmod,v 1.29 2002/04/03 12:02:04 mast Exp $      constant is_RXML_encodable = 1;      #ifdef RXML_ENCODE_DEBUG   string _sprintf() {return "RXML.utils.pmod";}   #endif      constant short_format_length = 40;      final string format_short (mixed val, void|int length)
Roxen.git/server/etc/modules/RXML.pmod/utils.pmod:96:    "Cannot append another value %s to non-sequential value of type %s.\n",    format_short (vals[pos]), type->name);    return res;   }      final int(1..1)|string|array unknown_tag_error (object/*(RMXL.PXml)*/ p, string str)   {    p->context->handle_exception (    catch (RXML.parse_error (    "Unknown tag %s is not allowed in context of type %s.\n", -  format_short (p->tag_name()), p->type->name)), p, 1); +  format_short (p->tag_name()), p->type->name)), +  p, p->p_code);    return ({});   }      final int(1..1)|string|array unknown_pi_tag_error (object/*(RMXL.PXml)*/ p, string str)   {    sscanf (str, "%[^ \t\n\r]", str);    p->context->handle_exception (    catch (RXML.parse_error (    "Unknown processing instruction %s not allowed in context of type %s.\n", -  format_short ("<" + p->tag_name() + str), p->type->name)), p, 1); +  format_short ("<" + p->tag_name() + str), p->type->name)), +  p, p->p_code);    return ({});   }      final int(1..1)|string|array invalid_cdata_error (object/*(RXML.PXml)*/ p, string str)   {    p->context->handle_exception (    catch (RXML.parse_error (    "CDATA text %O is not allowed in context of type %s.\n", -  format_short (str), p->type->name)), p, 1); +  format_short (str), p->type->name)), +  p, p->p_code);    return ({});   }      final int(1..1)|string|array output_error_cb (object/*(RMXL.PXml)*/ p, string str)   {    p->output_errors();    return ({str});   }      
Roxen.git/server/etc/modules/RXML.pmod/utils.pmod:147:    return ({tdef});    else if (arrayp (tdef))    return tdef[0] (p, p->parse_tag_args (str), @tdef[1..]);    else    return tdef (p, p->parse_tag_args (str));    }    else if (p->containers()[name])    p->context->handle_exception (    catch (RXML.parse_error (    "Sorry, can't handle containers beginning with %s.\n", -  p->tag_name())), p, 1); +  p->tag_name())), +  p, p->p_code);    }    return p->type->free_text ? 0 : ({});   }      final int(1..1)|string|array p_xml_cdata_cb (object/*(RXML.PXml)*/ p, string str)   {    return ({str});   }      final int(1..1)|string|array p_xml_entity_cb (object/*(RXML.PXml)*/ p, string str)
Roxen.git/server/etc/modules/RXML.pmod/utils.pmod:178:    catch (str = (string) ({char}));    // Lax error handling: Just let it through if it can't be    // converted. Not really good, though.    }    }    else    if (entity[0] == ':') str = entity[1..];    else if (has_value (entity, ".")) {    p->drain_output();    mixed value = p->handle_var ( -  p, +     entity,    // No quoting of splice args. FIXME: Add some sort of    // safeguard against splicing in things like "nice><evil    // stuff='...'"?    p->html_context() == "splice_arg" ? RXML.t_any_text : type);    if (value != RXML.nil) p->add_value (value);    return ({});    }    return ({str});   }      final int(1..1)|string|array p_xml_compat_entity_cb (object/*(RMXL.PXml)*/ p, string str)   {    RXML.Type type = p->type;    string entity = p->tag_name();    if (sizeof (entity) && entity[0] != '#')    if (entity[0] == ':') str = entity[1..];    else if (has_value (entity, ".")) {    p->drain_output();    mixed value = p->handle_var ( -  p, +     entity,    // No quoting of splice args. FIXME: Add some sort of    // safeguard against splicing in things like "nice><evil    // stuff='...'"?    p->html_context() == "splice_arg" ? RXML.t_any_text : type);    if (value != RXML.nil) p->add_value (value);    return ({});    }    return ({str});   }