2000-10-11
2000-10-11 22:48:33 by Martin Stjernholm <mast@lysator.liu.se>
-
641d3c4609e86821ed51b511e1e340d0ad86c25f
(33 lines)
(+18/-15)
[
Show
| Annotate
]
Branch: 5.2
Added Frame.get_overridden_tag as shortcut to
TagSet.get_overridden_tag.
Rev: server/etc/modules/RXML.pmod/module.pmod:1.116
2:
//!
//! Created 1999-07-30 by Martin Stjernholm.
//!
- //! $Id: module.pmod,v 1.115 2000/09/28 02:07:04 nilsson Exp $
+ //! $Id: module.pmod,v 1.116 2000/10/11 22:48:33 mast Exp $
//! Kludge: Must use "RXML.refs" somewhere for the whole module to be
//! loaded correctly.
1848:
get_context()->delete_var (var, scope_name);
}
- void run_error (string msg, mixed... args)
+ local void run_error (string msg, mixed... args)
//! A wrapper for easy access to RXML.run_error().
{
_run_error (msg, @args);
}
- void parse_error (string msg, mixed... args)
+ local void parse_error (string msg, mixed... args)
//! A wrapper for easy access to RXML.parse_error().
{
_parse_error (msg, @args);
1867:
if (flags & FLAG_DEBUG) werror (msg, @args);
}
- void terminate()
+ local void terminate()
//! Makes the parser abort. The data parsed so far will be returned.
//! Does not return; throws a special exception instead.
{
fatal_error ("FIXME\n");
}
- void suspend()
+ local void suspend()
//! Used together with resume() for nonblocking mode. May be called
//! from any frame callback to suspend the parser: The parser will
//! just stop, leaving the context intact. If it returns, the parser
1884:
fatal_error ("FIXME\n");
}
- void resume()
+ local void resume()
//! Makes the parser continue where it left off. The function that
//! called suspend() will be called again.
{
fatal_error ("FIXME\n");
}
- mapping(string:Tag) get_plugins()
+ local mapping(string:Tag) get_plugins()
//! Returns the plugins registered for this tag, which is assumed to
//! be a socket tag, i.e. to have FLAG_SOCKET_TAG set (see
//! Tag.plugin_name for details). Indices are the plugin_name values
1905:
return get_context()->tag_set->get_plugins (tag->name, tag->flags & FLAG_PROC_INSTR);
}
- Frame|string propagate_tag (void|mapping(string:string) args, void|string content)
+ local Tag get_overridden_tag()
+ //! Returns the Tag object the tag for this frame overrides, if any.
+ {
+ return get_context()->tag_set->get_overridden_tag (tag);
+ }
+
+ local Frame|string propagate_tag (void|mapping(string:string) args, void|string content)
//! This function is intended to be used in the execution array from
//! do_return() etc to propagate the tag to the next overridden tag
//! definition, if any exists. It either returns a frame from the
1916:
//! the tag after parsing, otherwise the raw_tag_text variable is
//! used, which must have a string value.
{
- Context ctx = get_context();
- object(Tag) overridden = ctx->tag_set->get_overridden_tag (tag);
- if (arrayp (overridden))
- fatal_error ("Getting frames for low level tags are currently not implemented.\n");
-
- if (overridden) {
+ if (object(Tag) overridden = get_overridden_tag()) {
Frame frame;
if (!args) {
#ifdef MODULE_DEBUG
1959: Inside #if defined(MODULE_DEBUG)
#ifdef MODULE_DEBUG
if (mixed err = catch {
#endif
- return t_xml (PEnt)->eval (this_object()->raw_tag_text, ctx, empty_tag_set);
+ return t_xml (PEnt)->eval (this_object()->raw_tag_text,
+ get_context(), empty_tag_set);
#ifdef MODULE_DEBUG
}) {
if (objectp (err) && ([object] err)->thrown_at_unwind)