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

xml.general

Class XM_UNICODE_CHARACTERS


Known direct descendants

XM_UNICODE_CHARACTERS_1_0, XM_UNICODE_CHARACTERS_1_1

Features

Invariants

indexing

description

XML unicode character classes

library

Gobo Eiffel XML Library

copyright

Copyright (c) 2004, Eric Bezault and others

license

Eiffel Forum License v2 (see forum.txt)

date

$Date: 2004/03/18 17:40:58 $

revision

$Revision: 1.3 $

deferred class

XM_UNICODE_CHARACTERS

feature -- Strings

is_name (a_name: STRING): BOOLEAN

-- Is a_name a valid XML 'Name'?

require
a_name_not_void: a_name /= Void
ensure
empty_not_name: a_name.is_empty implies not Result
is_ncname (a_name: STRING): BOOLEAN

-- Is a_name a valid XML Namespace 'NCName'?

require
a_name_not_void: a_name /= Void
ensure
empty_not_name: a_name.is_empty implies not Result
is_nmtoken (a_name: STRING): BOOLEAN

-- Is a_name a valid XML 'Nmtoken'?

require
a_name_not_void: a_name /= Void
is_qname (a_name: STRING): BOOLEAN

-- Is a_name a valid XML Namespace 'Qname'?
-- Qname := [NCName ':']? NCName

require
a_name_not_void: a_name /= Void
ensure
empty_not_name: a_name.is_empty implies not Result
is_string (a_string: STRING): BOOLEAN

-- Is a_string a string containing no invalid XML characters?

require
a_string_not_void: a_string /= Void
ensure
empty: (a_string.count = 0) implies Result

feature -- Characters

is_char (a: INTEGER): BOOLEAN

-- Valid content character?

is_name_char (a: INTEGER): BOOLEAN

-- Character for name?

is_name_first (a: INTEGER): BOOLEAN

-- Valid first character of name?

is_space (a: INTEGER): BOOLEAN

-- Space character?

feature -- Namespace characters

is_ncname_char (a: INTEGER): BOOLEAN

-- Is this a valid 'NCName' character?

ensure
definition: Result = (a /= (':').code and is_name_char (a))
is_ncname_first (a: INTEGER): BOOLEAN

-- Is this a valid first character of a 'NCName'?

ensure
definition: Result = (a /= (':').code and is_name_first (a))

invariant

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

end