net.sf.saxon.evpull
public class EventToStaxBridge extends Object implements XMLStreamReader
An EventIterator may provide access to any XDM sequence, whereas an XMLStreamReader always reads a document. The conversion of a sequence to a document follows the rules for "normalizing" a sequence in the Serialization specification: for example, atomic values are converted into text nodes, with adjacent atomic values being space-separated.
Nested Class Summary | |
---|---|
static class | EventToStaxBridge.DummyLocation |
Constructor Summary | |
---|---|
EventToStaxBridge(EventIterator provider, PipelineConfiguration pipe)
Create a EventToStaxBridge instance, which wraps a Saxon EventIterator as a Stax XMLStreamReader |
Method Summary | |
---|---|
void | close() |
int | getAttributeCount() |
String | getAttributeLocalName(int i) |
QName | getAttributeName(int i) |
String | getAttributeNamespace(int i) |
String | getAttributePrefix(int i) |
String | getAttributeType(int i) |
String | getAttributeValue(int i) |
String | getAttributeValue(String uri, String local) |
String | getCharacterEncodingScheme() |
String | getElementText() |
String | getEncoding() |
int | getEventType() |
String | getLocalName() |
Location | getLocation() |
QName | getName() |
NamePool | getNamePool()
Get the NamePool used by this bridge to translate integer name codes to QNames |
NamespaceContext | getNamespaceContext() |
int | getNamespaceCount() |
String | getNamespacePrefix(int i) |
String | getNamespaceURI() |
String | getNamespaceURI(int i) |
String | getNamespaceURI(String prefix) |
String | getPIData() |
String | getPITarget() |
String | getPrefix() |
Object | getProperty(String s) |
EventIterator | getProvider()
Get the underlying event stream |
String | getText() |
char[] | getTextCharacters() |
int | getTextCharacters(int sourceStart, char[] target, int targetStart, int length) |
int | getTextLength() |
int | getTextStart() |
String | getVersion() |
boolean | hasName() |
boolean | hasNext() |
boolean | hasText() |
boolean | isAttributeSpecified(int i) |
boolean | isCharacters() |
boolean | isEndElement() |
boolean | isStandalone() |
boolean | isStartElement() |
boolean | isWhiteSpace() |
int | next() |
int | nextTag() |
void | require(int event, String uri, String local) |
boolean | standaloneSet() |
Parameters: provider the Saxon EventIterator from which the events will be read. This must return a fully decomposed event stream, that is, document and element nodes must be presented as separate events for the start, content, and end. pipe the PipelineConfiguration
Returns: the name pool in use