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

xml.event

Class XM_DTD_ATTRIBUTE_CONTENT


Direct ancestors

UC_UNICODE_FACTORY, KL_IMPORTED_STRING_ROUTINES, KL_IMPORTED_BOOLEAN_ROUTINES

Creation

Features

Invariants

indexing

description

Declarations of attribute content in DTD

library

Gobo Eiffel XML Library

copyright

Copyright (c) 2002, Eric Bezault and others

license

Eiffel Forum License v2 (see forum.txt)

date

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

revision

$Revision: 1.14 $

class

XM_DTD_ATTRIBUTE_CONTENT

inherit

KL_IMPORTED_BOOLEAN_ROUTINES

create

make

-- Create a new DTD attribute content.

ensure
no_name: not has_name
no_default: not has_default_value
data: is_data
implied: is_value_implied

feature -- Access

boolean_: KL_BOOLEAN_ROUTINES

-- Routines that ought to be in class BOOLEAN

-- (From KL_IMPORTED_BOOLEAN_ROUTINES)

ensure
boolean_routines_not_void: Result /= Void

feature -- Name content type

has_name: BOOLEAN

-- Has name been set?

name: STRING

-- Attribute name

set_name (a_name: like name)

-- Set name.

require
a_name_not_void: a_name /= Void
ensure
name_set: name = a_name

feature -- Default value

copy_default (other: XM_DTD_ATTRIBUTE_CONTENT)

-- Copy default value settings from 'other'.

require
other_not_void: other /= Void
default_value: STRING

-- require has_default_value
-- ensure Result /= Void

has_default_value: BOOLEAN

-- Is there a default value?

set_default_value (a_value: like default_value)

-- Set default value.

require
a_value_not_void: a_value /= Void
ensure
default_value_set: default_value = a_value

feature -- Defaults

is_value_fixed: BOOLEAN

-- Is value fixed?

is_value_implied: BOOLEAN

-- Is attribute value implied?

is_value_required: BOOLEAN

-- Is attribute value required?

set_value_fixed (a_value: like default_value)

-- Set fixed value.

require
a_value_not_void: a_value /= Void
ensure
set: is_value_fixed
has_default: has_default_value
set_value_implied

-- Attribute value implied.

ensure
set_value_required

-- Attribute value required.

ensure

feature -- String content type

is_data: BOOLEAN

-- CDATA, arbitrary character data?

set_data

-- CDATA.

ensure
set: is_data

feature -- Enumerated content type

is_enumeration: BOOLEAN

-- Fixed enumeration?

is_notation: BOOLEAN

-- NOTATION?

set_enumeration

-- Fixed enumeration.

ensure
set_notation

-- NOTATION.

ensure

feature -- Tokenized content type

is_entity: BOOLEAN

-- ENTITY?

is_id: BOOLEAN

-- ID (identifier declaration)?

is_id_ref: BOOLEAN

-- IDREF (identifier reference)?

is_list_type: BOOLEAN

-- Is the type a list (NMTOKENS, ENTITIES, IDREFS)?

is_token: BOOLEAN

-- NMTOKEN?

set_entity

-- ENTITY.

ensure
set: is_entity
set_id

-- ID.

ensure
set: is_id
set_id_ref

-- IDREF.

ensure
set: is_id_ref
set_list_type

-- Set type to list.

require
ensure
set_token

-- NMTOKEN.

ensure
set: is_token

feature -- Enumeration

enumeration: DS_LIST [STRING]

-- List of allowed values for fixed enumeration.

require
is_enumeration: is_enumeration
ensure
result_not_void: Result /= Void
set_enumeration_list (a_list: like enumeration)

-- Set enumeration type and associated list.

require
not_void: a_list /= Void
ensure
enumeration_type_forced: is_enumeration
list_set: enumeration_list = a_list

feature -- Output

out: STRING

-- Like in DTD.

-- (From ANY)

invariant

exclusive: BOOLEAN_.nxor (<<is_token, is_entity, is_id_ref, is_id, is_data, is_notation, is_enumeration>>)
list_ok: is_list_type implies (is_token or is_entity or is_id_ref)
impl_type_enumeration: (

CIRETNU

).has (type)
impl_default_enumeration: (

DRIF

).has (value)

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

end