This library has 53 classes.
ECF: document-scan.ecf
Source code: directory list
A set of abstractions for scanning the nodes of an XML-like document without any commitment to a particular document syntax. Parsers to generate events are provided by separate libraries.
Provides:
Base library for:
XML Node Scanning
The abstraction EL_PARSE_EVENT_SOURCE representing a parse-event source has 5 useful descendants:
EL_PARSE_EVENT_SOURCE* EL_BINARY_ENCODED_PARSE_EVENT_SOURCE EL_EXPAT_XML_PARSER EL_EXPAT_XML_PARSER_OUTPUT_MEDIUM EL_EXPAT_XML_WITH_CTRL_Z_PARSER EL_EXPAT_XHTML_PARSER EL_DEFAULT_PARSE_EVENT_SOURCE EL_PYXIS_PARSER
Class EL_BINARY_ENCODED_PARSE_EVENT_SOURCE is a binary encoded XML event source, useful for reducing the size of large documents for transfer across a network.
The following are the various kinds of scanners which can process the output from these event sources.
Eiffel Object Building Scanners
The classes EL_BUILDABLE_FROM_XML and EL_BUILDABLE_FROM_PYXIS can be used to implement a sophisticated Eiffel object building scheme based on the idea of mapping builder agents to xpaths relative to particular element contexts. Only a small subset of the xpath standard is used. The framework has the following features:
General Xpath to Eiffel agent mapper
The class EL_CREATEABLE_FROM_XPATH_MATCH_EVENTS implements a method for scanning a document and triggering various Eiffel agents according to a table of xpath to agent mappings.
Eiffel Aware Document Scanner
The class EL_SMART_BUILDABLE_FROM_NODE_SCAN is an XML parser that reacts to a special XML processing instruction, telling it to build an Eiffel object of a particular type.
. /eif-object-building/context
. /eif-object-building/reflective-context
Top level abstraction for building nested Eiffel objects by matching relative xpaths to an XML parse event source defined by new_node_source. The xpaths are mapped to agents by implementing the function building_action_table found in class EL_EIF_OBJ_BUILDER_CONTEXT. Typically the agents assign a class attribute value by calling a value function of the last_node object. But the agent might also change the Eiffel object context by calling the procedure set_next_context. The new context is mapped to some element in the document and all xpaths in the new current context are relative to this element. Returning to the parent context happens automatically when all the nodes in the current element have been visited. The top level context is defined by implementing the attribute root_node_name which defines the root element name.
The most useful descendants of this class are EL_BUILDABLE_FROM_XML and EL_BUILDABLE_FROM_PYXIS. The latter implements a parser for Pyxis, an XML analog with a Python inspired syntax.
Further Information
Click on class link to see descendants and client examples.
Object that is createable from document parse events
Further Information
Click on class link to see client examples.
Object that scans an XML node event source, matching visited nodes against a user defined set of xpaths. Matching nodes trigger a call to an agent defined in the mapping function xpath_match_events. The agent can process the visited node by accessing the last_node attribute.
Further Information
Click on class link to see notes and client examples.
Default buildable from node scan
Map xpath node matches of XML/Pyxis document to EL_XPATH_TO_AGENT_MAP handlers
Further Information
Click on class link to see client examples.
File persistent buildable from node scan
Node scan builder that can respond to a create processing instructions before the root element as for example:
<?xml version="1.0" encoding="UTF-8"?> <?create {SMIL_PRESENTATION}?> <smil> .. </smil>
SMIL_PRESENTATION' implements the deferred class EL_BUILDABLE_FROM_NODE_SCAN. The created object is accessible via the stack container result_stack.
Further Information
Click on class link to see client examples.
Compiles a set of all unique xpaths during document scan
Eiffel object model Xpath context
Further Information
Click on class link to see notes and client examples.
Eiffel object root builder context
Convenience class to store all element values for a context in a table but without recursing deeper
Further Information
Click on class link to see client examples.
Eiffel object xpath context
Further Information
Click on class link to see notes and client examples.
Root builder context that changes the type of the target object to build according to a processing instruction at the start of the XML. The example below will build an instance of class SMIL_PRESENTATION.
<?xml version="1.0" encoding="utf-8"?> <?create {SMIL_PRESENTATION}?> <smil xmlns="http://www.w3.org/2001/SMIL20/Language"> .. </smil>
Xpath to a document node
Eiffel object builder context class meta data
Eiffel object builder context type constants
Reflectively buildable from node scan
Reflective Eiffel object builder (from XML) context
Further Information
Click on class link to see descendants and client examples.
EL_EIF_OBJ_BUILDER_CONTEXT for EL_REFLECTIVE object attribute
Document cyclic redundancy check 32
Further Information
Click on class link to see client examples.
Xml node event handler
Xhtml word counter
Further Information
Click on class link to see client examples.
Document node string with specific encoding encoding_name
Further Information
Click on class link to see client examples.
Document element attribute list
Further Information
Click on class link to see client examples.
XML element attribute node string
Further Information
Click on class link to see client examples.
Binary encoded XML document scanner
Further Information
Click on class link to see client examples.
Eiffel object builder from XML/Pyxix node scanning source
Xml document logger
Further Information
Click on class link to see client examples.
Object that scans an abstract parseable document consisting of the following node types: Scans sequentially the XML node visiting events originating from event_source.
Further Information
Click on class link to see notes.
Object that applies XML parse events to the construction of an object
General parse event generator that can use Pyxis or XML as input source
Further Information
Click on class link to see client examples.
Smart node scan to eiffel object builder
Generate XML document from node scan source to output. If output conforms to EL_OUTPUT_MEDIUM then the output encoding is the one set in the medium, otherwise the output encoding is the same as event_source.encoding.
Agent actions to be applied on each match of a tokenized xpath EL_TOKENIZED_XPATH while scanning a document object conforming to EL_XPATH_MATCH_SCAN_SOURCE
Class for scanning document nodes and checking if each node path matches against a set of xpath expressions, each mapped to procedure. If a node matches, the procedure is called.
Compiles a set of all unique xpaths for document
Binary encoded parse event source
Further Information
Click on class link to see client examples.
Binary encoded xml parse event type
Further Information
Click on class link to see client examples.
Default parse event source
Parse event source for Pyxis or XML document
Further Information
Click on class link to see descendants.
Hints for reflective classes as to which fields should be explicitly mapped to XML attribute text
Further Information
Click on class link to see notes and client examples.
Type of EL_REFLECTED_FIELD for purposes of mapping to XML attribute
XML node client
Further Information
Click on class link to see client examples.
Hints for reflective classes as to which fields should be explicitly mapped to XML element text with the default being a map to an element attribute.
Further Information
Click on class link to see notes.
Hints for reflective classes as to how fields should be mapped to XML attributes/elements
Document parser output medium
Xml parse event stream
Smil value parsing
Further Information
Click on class link to see client examples.
Constants for document node scanning
Further Information
Click on class link to see client examples.
Tokenized form of xpath
Xpath node type constants
Xpath step token table
Xpath to agent map
Further Information
Click on class link to see client examples.