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

xml.general

Class XM_UNICODE_CHARACTERS_1_0


Direct ancestors

XM_UNICODE_CHARACTERS

Known direct descendants

XM_UNICODE_CHARACTER_CLASSES, XM_XPOINTER_NAMESPACE_CONTEXT, XM_XPOINTER_PARSER

Features

Invariants

indexing

description

XML unicode character classes

implements

Appendix B of XML 1.0 -- second edition

library

Gobo Eiffel XML Library

copyright

Copyright (c) 2002, Eric Bezault and others

license

Eiffel Forum License v2 (see forum.txt)

date

$Date: 2004/03/17 04:03:25 $

revision

$Revision: 1.1 $

class

XM_UNICODE_CHARACTERS_1_0

inherit

XM_UNICODE_CHARACTERS

feature -- Valid characters (section 2.2)

is_char (a: INTEGER): BOOLEAN

-- Valid content character?

-- (From XM_UNICODE_CHARACTERS)

is_name_char (a: INTEGER): BOOLEAN

-- Character for name?

-- (From XM_UNICODE_CHARACTERS)

is_name_first (a: INTEGER): BOOLEAN

-- Valid first character of name?

-- (From XM_UNICODE_CHARACTERS)

is_space (a: INTEGER): BOOLEAN

-- Space character?

-- (From XM_UNICODE_CHARACTERS)

feature -- Character classes (appendix B)

is_base_char (a: INTEGER): BOOLEAN

-- Base char class.

is_combining_char (a: INTEGER): BOOLEAN

-- Combining char class.

is_digit (a: INTEGER): BOOLEAN

-- Digit class.

is_extender (a: INTEGER): BOOLEAN

-- Extender class.

is_ideographic (a: INTEGER): BOOLEAN

-- Ideographic class.

is_letter (a: INTEGER): BOOLEAN

-- Letter class.

feature -- Namespace characters

is_ncname_char (a: INTEGER): BOOLEAN

-- Is this a valid 'NCName' character?

-- (From XM_UNICODE_CHARACTERS)

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

-- (From XM_UNICODE_CHARACTERS)

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

feature -- Strings

is_name (a_name: STRING): BOOLEAN

-- Is a_name a valid XML 'Name'?

-- (From XM_UNICODE_CHARACTERS)

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

-- (From XM_UNICODE_CHARACTERS)

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

-- (From XM_UNICODE_CHARACTERS)

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

-- (From XM_UNICODE_CHARACTERS)

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?

-- (From XM_UNICODE_CHARACTERS)

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

invariant


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

end