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

xml.resolver.simple

Class XM_FILE_EXTERNAL_RESOLVER


Direct ancestors

XM_EXTERNAL_RESOLVER, KL_IMPORTED_STRING_ROUTINES

Creation

Features

Invariants

indexing

description

External resolver that opens files on the local filesystem

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:02 $

revision

$Revision: 1.2 $

class

XM_FILE_EXTERNAL_RESOLVER

inherit

XM_EXTERNAL_RESOLVER

create

make

-- Make.

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

-- Error

-- (From XM_EXTERNAL_RESOLVER)

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

-- 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

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

end