Datasheet
XNI Basics
An XNI-based parser contains two pipelines that do all the work: the document pipeline and
the DTD pipeline. The pipelines consist of instances of XMLComponent that are chained together
via interfaces that represent the streaming information set. Unlike SAX, which has a single pipeline,
XNI divides the pipeline in two: one pipeline for the content of the document and a separate
pipeline for dealing with the information DTD. The pipeline interfaces live in org.apache.xerces.xni:
Interface Purpose
XMLDocumentHandler The major interface in the document content pipeline.
This should be familiar to anyone familiar with SAX.
XMLDocumentFragmentHandler The document content pipeline can handle document
fragments as well. To do this, you need to connect
stages using XMLDocumentFragmentHandler instead
of XMLDocumentHandler.
XMLDTDHandler The major interface in the DTD pipeline. It handles
everything except parsing the content model part of
element declarations.
XMLDTDContentModelHandler Provided for applications that want to parse the con-
tent model part of element declarations.
XMLString A structure used to pass text around within XNI. You
must copy the text out of an XMLString if you want
use it after the XNI method has executed. XMLStrings
should be treated as read-only.
XNIException An Exception class for use with the XNI layer.
Augmentations A data structure like a hash table, for storing augmen-
tations to the stream information set. The set of aug-
mentations is an argument to almost every XNI
method in the content and DTD pipelines.
QName An abstraction of XML QNames.
XMLAttributes An abstraction for the set of attributes associated with
an element.
XMLLocator A data structure used to hold and report the location
in the XML document where processing is occurring /
has failed.
XMLResourceIdentifier A data structure representing the public ID, system
ID, and namespace of an XML resource (XML Schema,
DTD, or general entity).
NamespaceContext An abstraction representing the stack of namespace
contexts (like variable scopes) within an XML
document.
39
Xerces
01 543555 Ch01.qxd 11/5/03 9:40 AM Page 39