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

xml.resolver.simple

Class XM_STRING_EXTERNAL_RESOLVER


Direct ancestors

XM_EXTERNAL_RESOLVER, KL_IMPORTED_STRING_ROUTINES, UC_SHARED_STRING_EQUALITY_TESTER

Creation

Features

Invariants

indexing

description

External resolver using strings for entity content

library

Gobo Eiffel XML Library

copyright

Copyright (c) 2004, Andreas Leitner and others

license

Eiffel Forum License v2 (see forum.txt)

date

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

revision

$Revision: 1.2 $

class

XM_STRING_EXTERNAL_RESOLVER

inherit

XM_EXTERNAL_RESOLVER

create

make

-- Make.

ensure
empty: strings.is_empty

feature -- Access

strings: DS_HASH_TABLE [STRING, STRING]

-- Table of strings indexed by resolution names.

feature -- Action(s)

resolve (a_system_name: STRING)

-- Open file with corresponding name.

-- (From XM_EXTERNAL_RESOLVER)

require
a_system_not_void: a_system /= Void
ensure
stream_open_on_success: not has_error implies last_stream.is_open_read
resolve_finish

-- The parser has finished with the last resolved entity.
-- The previously resolved entity becomes the last resolved one.
-- Note: last_stream is not required to be restored accordingly.

-- (From XM_EXTERNAL_RESOLVER)

resolve_public (a_public: STRING; a_system: STRING)

-- Resolve a public/system identified pair to an input stream.
-- (Default implementation: resolve using system ID only.)

-- (From XM_EXTERNAL_RESOLVER)

require
a_public_not_void: a_public /= Void
a_system_not_void: a_system /= Void
ensure
stream_open_on_success: not has_error implies last_stream.is_open_read

feature -- Result

has_error: BOOLEAN

-- Is there an error.

-- (From XM_EXTERNAL_RESOLVER)

last_error: STRING

-- Last error.

-- (From XM_EXTERNAL_RESOLVER)

require
has_error: has_error
ensure
not_void: Result /= Void
last_stream: KI_CHARACTER_INPUT_STREAM

-- File matching stream.

-- (From XM_EXTERNAL_RESOLVER)

require
not_error: not has_error
ensure
not_void: Result /= Void

invariant

error_or_stream: last_stream /= Void xor last_error /= Void
strings_not_void: strings /= Void

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

end