indexing
	description: "Class which contains the information relative to an html page."
	date: "$Date$"
	revision: "$Revision$"

class interface
	HTML_PAGE

create 

	make
			-- Create an HTML page.

	make_from_template (fi_n: STRING)
			-- Create an HTML page from a template whose path name is
			-- 'fi'. The template may contains special symbols/words, which
			-- will allow smart replacing (see feature 'replace').
		require
			path_not_void: fi_n /= void
		ensure
			image_exists: image /= void

feature -- Initialization

	make
			-- Create an HTML page.

	make_from_template (fi_n: STRING)
			-- Create an HTML page from a template whose path name is
			-- 'fi'. The template may contains special symbols/words, which
			-- will allow smart replacing (see feature 'replace').
		require
			path_not_void: fi_n /= void
		ensure
			image_exists: image /= void
	
feature -- Access

	out: STRING
			-- Usable copy of the output.
	
feature -- Basic Operations

	add_html_code (s: STRING)
			-- Add html code 's'.
		require
			code_exists: s /= void

	insert_hidden_field (name, value: STRING)
			-- Insert hidden field with name 'name' and value 'value'.
		require
			has_form: out.substring_index ("</form>", 1) > 0 or out.substring_index ("</FORM>", 1) > 0

	replace_marker (a_marker, s: STRING)
			-- Replace marker 'a_marker' by string 's'
			-- within the template.
			-- Do nothing if it does not exist.
		require
			not_void: a_marker /= void and s /= void
	
invariant

	page_exists: out /= void
		-- from ANY
	reflexive_equality: standard_is_equal (Current)
	reflexive_conformance: conforms_to (Current)

end -- class HTML_PAGE