|
XML extensions provide built-in ECMAScript objects that support basic XML processing interfaces.
Many object categories provide functionality specified by SAX2: Simple API for XML, effectively implementing ECMAScript bindings for SAX2. Few other objects, that have no counterparts in SAX2, were introduced to support integration of various XML-enabling ECMAScript extensions available in UESI (e.g., DOM and XSLT), and to provide sophisticated XML output facility (XML Writer) designed to represent XML documents in XML, HTML and text formats.
Attributes objects represent lists of XML attributes.
They implement functionality similar to that of
the Attributes
interface
and AttributesImpl
class
specified by SAX2.
ContentHandler objects are used
to receive notifications of the logical content of documents.
They implement functionality similar to that of
the ContentHandler
interface
specified by SAX2.
DTDHandler objects are used
to receive notifications of basic DTD-related events.
They implement functionality similar to that of
the DTDHandler
interface
specified by SAX2.
EntityResolver objects
provide basic interface for resolving entities.
They implement functionality similar to that of
the EntityResolver
interface
specified by SAX2.
ErrorHandler objects provide
basic interface for XML Reader error handlers.
They implement functionality similar to that of
the ErrorHandler
interface
specified by SAX2.
InputSource objects represent
input sources for XML entities.
They implement functionality similar to that of
the InputSource
class
specified by SAX2.
Locator objects represent interface for associating
XML Stream events with document locations.
They implement functionality similar to that of
the Locator
interface
and LocatorImpl
class
specified by SAX2.
NamespacesSupport objects encapsulate namespace logic.
They implement functionality similar to that of
the NamespaceSupport
class
specified by SAX2.
Exception objects are used
to encapsulate general XML errors and warnings.
They implement functionality similar to that of
the SAXException
class
specified by SAX2.
NotSupportedException objects are used
for unsupported operations.
They implement functionality similar to that of
the SAXNotSupportedException
class
specified by SAX2.
NotRecognizedException objects are used
for unrecognized identifiers.
They implement functionality similar to that of
the SAXNotRecognizedException
class
specified by SAX2.
ParseException objects are used
to encapsulate XML parse errors and warnings.
They implement functionality similar to that of
the SAXParseException
class
specified by SAX2.
Stream objects represent interfaces for reading content of
XML documents. Every stream object generates a sequence of
events. Each event represents a piece of XML content.
Stream objects are normally associated with ContentHandler
objects. The latter implement the ContentHandler interface
and are used to process events generated by Streams.
There is no direct counterpart for Stream objects in SAX2.
In UESI, Stream represents more primitive object type than
the interface XMLReader
recommended by SAX2, since it does not provide DTD handling,
entity resolving and handling for parse errors.
Processor objects combine functionality provided by
Stream and ContentHandler objects.
The Processor instance is like a Stream, except that it obtains
its events from another Stream rather than a primary source.
Processors can modify a stream of events as they pass on to
their associated content handlers.
Processor objects can be used to implement pipelines of XML
processing components.
The Processor objects have no direct counterparts in SAX2.
In UESI, the Stream and Processor objects have relation similar
to that of interfaces XMLReader
and XMLFilter
specified by SAX2.
Reader objects implement interface for reading
XML documents using callbacks.
They implement functionality similar to that of
the XMLReader
interface
specified by SAX2.
Filter objects implement interface for XML filters.
They implement functionality similar to that of
the XMLFilterImpl
class
specified by SAX2.
Filter objects combine functionality provided by
Reader, DTDHandler, ContentHandler, EntityResolver and
ErrorHandler objects.
The Filter instance is like Reader, except that it obtains its
events from another Reader rather than a primary source.
Filters can modify a stream of events as they pass on to the
final destination.
Writer objects implement interface for writing XML documents using XML, HTML and text output methods. Writer objects have no counterparts in core SAX2. The functionality of Writer objects is modelled after the output facility of XSL Transformations (XSLT), version 1.0.
Stream and ContentHandler objects play an important role for integration of various XML-enabling ECMAScript extensions implemented by UESI. Stream objects generate sequences of events representing content of XML documents, while ContentHandler objects act as consumers (processors) of these events. Some objects may act as both streams and content handlers. By linking streams and content handlers together, various UESI XML-enabling components can be integrated to provide the desired XML processing functonality.
Many objects supported by other ECMAScript extension packages available in UESI (e.g., DOM and XSLT) implement interfaces of Stream or ContentHandler, and therefore can be integrated using the common basic concept.
The detailed description of XML Extensions can be found in a separate document, Unicorn ECMAScript Interpreter Reference Manual. XML Extensions, Version 2.0.
DOM extensions provide built-in ECMAScript objects that implement ECMAScript bindings for interfaces defined in DOM Level 1.
Node objects implement bindings for Node
interface
specified by DOM.
NodeList objects implement bindings for NodeList
interface
specified by DOM.
NamedNodeMap objects implement bindings for
NamedNodeMap
interface
specified by DOM.
DOMImplementation objects implement bindings for
DOMImplementation
interface
specified by DOM.
DocumentFragment objects implement bindings for
DocumentFragment
interface
specified by DOM.
Document objects implement bindings for
Document
interface
specified by DOM.
CharacterData objects implement bindings for
CharacterData
interface
specified by DOM.
Attr objects implement bindings for Attr
interface
specified by DOM.
Element objects implement bindings for Element
interface
specified by DOM.
Text objects implement bindings for Text
interface
specified by DOM.
Comment objects implement bindings for Comment
interface
specified by DOM.
CDATASection objects implement bindings for
CDATASection
interface
specified by DOM.
EntityReference objects implement bindings for
EntityReference
interface
specified by DOM.
ProcessingInstruction objects implement bindings for
ProcessingInstruction
interface
specified by DOM.
Reader objects are designed to traverse the DOM subtree in the document order, generating the appropriate stream of SAX2 events. Reader objects implement XML Stream interface and can be used in any context where XML Stream is required. Reader objects do not implement any specific DOM interface.
Writer objects are designed process the stream of SAX2 events, creating a set of DOM nodes and appending these nodes to the children list of a given root node. Writer objects implement XML ContentHandler interface and can be used in any context where XML ContentHandler is required. Writer objects do not implement any specific DOM interface.
The detailed description of DOM Extensions can be found in a separate document, Unicorn ECMAScript Interpreter Reference Manual. DOM Extensions, Version 2.0.
XPath extensions provide built-in ECMAScript objects that support XPath expressions and node-sets. XPath extensions are built on the top of ECMAScript XML extensions and DOM extensions.
NodeSet objects represent XPath node-sets.
Expr objects represent XPath expressions.
The detailed description of XPath Extensions can be found in a separate document, Unicorn ECMAScript Interpreter Reference Manual. XPath Extensions, Version 2.0.
XSLT extensions provide built-in ECMAScript objects that support XSLT transformations. XSLT extensions are built on the top of XML extensions and DOM extensions implemented by UESI.
Processor objects represent XSLT processors.
Stylesheet objects represent XSLT stylesheets.
Pattern objects are used to represent XSLT paterns and to implement the XSLT pattern matching facility.
The detailed description of XSLT Extensions can be found in a separate document, Unicorn ECMAScript Interpreter Reference Manual. XSLT Extensions, Version 2.0.
|