elogger API
Overview Classes Cluster Class Index          Top Features

xml.xml_xpointer.xpointer_common

Class XM_XPOINTER_PARSER


Direct ancestors

XM_XPOINTER_TOKENS, KL_IMPORTED_STRING_ROUTINES, XM_UNICODE_CHARACTERS_1_0, UC_SHARED_STRING_EQUALITY_TESTER

Creation

Features

Invariants

indexing

description

Objects that parse XPointers at a generic level

library

Gobo Eiffel XPointer Library

copyright

Copyright (c) 2005, Colin Adams and others

license

Eiffel Forum License v2 (see forum.txt)

class XM_XPOINTER_PARSER

inherit

XM_XPOINTER_TOKENS
KL_IMPORTED_STRING_ROUTINES
XM_UNICODE_CHARACTERS_1_0
XM_UNICODE_CHARACTERS
UC_SHARED_STRING_EQUALITY_TESTER

create

make

-- Establish invariant.

feature -- Access

Eof_token: INTEGER

-- End of input reached
-- (From XM_XPOINTER_TOKENS)

Escaped_carat_token: INTEGER

-- ^^
-- (From XM_XPOINTER_TOKENS)

Left_escaped_parenthesis_token: INTEGER

-- ^(
-- (From XM_XPOINTER_TOKENS)

Left_parenthesis_token: INTEGER

-- (
-- (From XM_XPOINTER_TOKENS)

Right_escaped_parenthesis_token: INTEGER

-- ^)
-- (From XM_XPOINTER_TOKENS)

Right_parenthesis_token: INTEGER

-- )
-- (From XM_XPOINTER_TOKENS)

String_token: INTEGER

-- Any string
-- (From XM_XPOINTER_TOKENS)

Unknown_token: INTEGER

-- Only when a lexical error
-- (From XM_XPOINTER_TOKENS)

Whitespace_token: INTEGER

-- Ignorable whitespace
-- (From XM_XPOINTER_TOKENS)

string_equality_tester: UC_STRING_EQUALITY_TESTER

-- String equality tester
-- (From UC_SHARED_STRING_EQUALITY_TESTER)

ensure

string_equality_tester_not_void: Result /= Void

scheme_data: DS_ARRAYED_LIST[STRING]

-- Data for each scheme in scheme_sequence

scheme_sequence: DS_ARRAYED_LIST[STRING]

-- Sequence of schemes to be processed (all are lexical QNames)

shorthand: STRING

-- Shorthand pointer

STRING_: KL_STRING_ROUTINES

-- Routines that ought to be in class STRING_8
-- (From KL_IMPORTED_STRING_ROUTINES)

ensure

string_routines_not_void: Result /= Void

feature -- Status report

error_code: STRING

-- Error text and code from parse

error_message: STRING

-- Error text and code from parse

is_error: BOOLEAN

-- Was an error detected?

is_shorthand: BOOLEAN

-- Has parse found a shorthand pointer?

feature -- Element change

parse (an_xpointer: STRING)

-- Parse an_xpointer into it's schemes.

require

xpointer_not_empty: an_xpointer /= Void and then an_xpointer.count > 0

ensure

no_error_implies_scheme_sequence: not is_error implies (is_shorthand or else scheme_sequence /= Void)

feature -- Character classes (appendix B)

is_base_char (a: INTEGER): BOOLEAN

-- Base char class.
-- (From XM_UNICODE_CHARACTERS_1_0)

is_combining_char (a: INTEGER): BOOLEAN

-- Combining char class.
-- (From XM_UNICODE_CHARACTERS_1_0)

is_digit (a: INTEGER): BOOLEAN

-- Digit class.
-- (From XM_UNICODE_CHARACTERS_1_0)

is_extender (a: INTEGER): BOOLEAN

-- Extender class.
-- (From XM_UNICODE_CHARACTERS_1_0)

is_ideographic (a: INTEGER): BOOLEAN

-- Ideographic class.
-- (From XM_UNICODE_CHARACTERS_1_0)

is_letter (a: INTEGER): BOOLEAN

-- Letter class.
-- (From XM_UNICODE_CHARACTERS_1_0)

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

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)

invariant

possible_error: is_error implies error_message /= Void and then error_code /= Void
shorthand_not_void: is_shorthand implies shorthand /= Void and then is_ncname (shorthand)
scheme_data_correct_length: scheme_sequence /= Void and then scheme_data /= Void and then scheme_sequence.count = scheme_data.count

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

Documentation generated by edoc