Eiffel Media API
Overview Cluster Class Classes Index      Previous Next      Top Features

xml.tree

Class XM_CALLBACKS_TO_TREE_FILTER


Direct ancestors

XM_CALLBACKS_FILTER

Creation

Features

Invariants

indexing

description

Callbacks filters producing trees

library

Gobo Eiffel XML Library

copyright

Copyright (c) 2001, Andreas Leitner and others

license

Eiffel Forum License v2 (see forum.txt)

date

$Date: 2005/07/13 19:49:04 $

revision

$Revision: 1.2 $

class

XM_CALLBACKS_TO_TREE_FILTER

inherit

XM_CALLBACKS_FILTER

create

make_null

-- Next is null processor.

-- (From XM_CALLBACKS_FILTER)

set_next (a_callbacks: like callbacks)

-- Set callbacks to a_callbacks.

-- (From XM_CALLBACKS_SOURCE)

require
a_callback_not_void: a_callback /= Void

feature -- Access

: XM_CALLBACKS

-- Callbacks event interface to which events are forwarded;
-- If void, a null callback is created on startup.

-- (From XM_FORWARD_CALLBACKS)

feature -- Position table

disable_position_table

-- Disable position table.

enable_position_table (a_source: XM_PARSER)

-- Enable position table, store the position
-- for each node into 'last_position_table', using the
-- positions from the source of the callbacks.

require
a_source_not_void: a_source /= Void
is_position_table_enabled: BOOLEAN

-- Is position table enabled?

feature -- Document

on_start

-- Reset.

-- (From XM_CALLBACKS)

feature -- Element

on_attribute (namespace, a_prefix, a_name: STRING; a_value: STRING)

-- Add attribute.

-- (From XM_CALLBACKS)

require
unresolved_namespace_is_void: has_resolved_namespaces implies a_namespace /= Void
local_part: is_local_part (a_local_part)
a_value_not_void: a_value /= Void
on_comment (com: STRING)

-- Processing comment.

-- (From XM_CALLBACKS)

require
a_content_not_void: a_content /= Void
on_content (a_data: STRING)

-- Character data

-- (From XM_CALLBACKS)

require
not_void: a_content /= Void
not_empty: a_content.count >= 0
on_end_tag (a_namespace, a_ns_prefix, a_local_part: STRING)

-- End tag

-- (From XM_CALLBACKS)

require
unresolved_namespace_is_void: has_resolved_namespaces implies a_namespace /= Void
local_part: is_local_part (a_local_part)
on_processing_instruction (target, data: STRING)

-- Processing instruction.

-- (From XM_CALLBACKS)

require
name_not_void: a_name /= Void
content_not_void: a_content /= Void
on_start_tag (namespace, ns_prefix, a_name: STRING)

-- called whenever the parser findes a start element.

-- (From XM_CALLBACKS)

require
unresolved_namespace_is_void: has_resolved_namespaces implies a_namespace /= Void
local_part: is_local_part (a_local_part)

feature -- Setting

set_next (a_callbacks: like callbacks)

-- Set callbacks to a_callbacks.

-- (From XM_CALLBACKS_SOURCE)

require
a_callback_not_void: a_callback /= Void

feature {NONE} -- Tag

on_start_tag_finish

-- End of start tag.

-- (From XM_CALLBACKS)

feature {NONE} -- Errors

on_error (a_message: STRING)

-- Event producer detected an error.

-- (From XM_CALLBACKS)

require
not_void: a_message /= Void

feature {NONE} -- Document

on_finish

-- Forward finish.

-- (From XM_CALLBACKS)

on_xml_declaration (a_version: STRING; an_encoding: STRING; a_standalone: BOOLEAN)

-- XML declaration.

-- (From XM_CALLBACKS)

require
a_version_not_void: a_version /= Void
a_version_not_empty: a_version.count > 0

feature -- Result

document: XM_DOCUMENT

-- Resulting document

feature -- Events mode

has_resolved_namespaces: BOOLEAN

-- Namespaces required

-- (From XM_CALLBACKS)

feature -- Support

has_namespace (a: STRING): BOOLEAN

-- Is namespace resolved?

-- (From XM_CALLBACKS)

has_prefix (a: STRING): BOOLEAN

-- Is prefix in use?

-- (From XM_CALLBACKS)

is_local_part (a: STRING): BOOLEAN

-- Is this a valid local part string?

-- (From XM_CALLBACKS)

ensure
definition: Result = (a /= Void and then a.count > 0)

invariant

next_not_void: next /= Void

-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)

end