Adapter that converts from StAX to SAX event streams. Currently the following SAX events are not generated:
ignorableWhitespace
skippedEntity
Also the following StAX events are not mapped:
CDATA
COMMENT
DTD
ENTITY_DECLARATION
ENTITY_REFERENCE
NOTATION_DECLARATION
SPACE
StAX ATTRIBUTE events are ignored but the equivalent attributes (derived from the START_ELEMENT event) are supplied in the SAX startElement event's Attributes parameter. If the adaptor is configured to pass namespace prefixes then namespace information will also be included in the Attributes; StAX NAMESPACE events are ignored. Another issue is namespace processing. If the reader is positioned at a sub-node, we cannot capture all the in-scope namespace bindings. Therefore we cannot re-create a proper SAX event stream from a StAX parser. For example <a:root xmlns:a="foo" xmlns:b="bar"><b:sub>a:foo</b:sub></a:root> And if you are handed a parser at <b:sub>, then your SAX events should look like: <b:sub xmlns:a="foo" xmlns:b="bar">a:foo</b:sub> not: <b:sub>a:foo</b:sub> Proposal: we change the receiver of SAX events (SDOXMLResourceImpl) so that it uses NamespaceContext to resolve prefix (as opposed to record start/endPrefixMappings and use it for resolution.)
@version $Rev: 801844 $ $Date: 2009-08-07 00:50:19 +0100 (Fri, 07 Aug 2009) $
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.