net.sf.saxon.pull
Class PullToStax
java.lang.Object
   net.sf.saxon.pull.PullToStax
net.sf.saxon.pull.PullToStax
- All Implemented Interfaces: 
- javax.xml.stream.XMLStreamConstants, javax.xml.stream.XMLStreamReader
- public class PullToStax 
- extends Object- implements javax.xml.stream.XMLStreamReader
This class bridges PullProvider events to XMLStreamReader (Stax) events. That is, it acts
 as an XMLStreamReader, fetching the underlying data from a PullProvider.
 
 A PullProvider 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.
 
 
| Fields inherited from interface javax.xml.stream.XMLStreamConstants | 
| ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT | 
 
| Constructor Summary | 
| PullToStax(PullProvider provider)Create a PullToStax instance, which wraps a Saxon PullProvider as a Stax XMLStreamReader
 | 
 
 
 
PullToStax
public PullToStax(PullProvider provider)
- Create a PullToStax instance, which wraps a Saxon PullProvider as a Stax XMLStreamReader
 
- Parameters:
- provider- the Saxon PullProvider from which the events will be read
 
getAttributeCount
public int getAttributeCount()
- 
- Specified by:
- getAttributeCountin interface- javax.xml.stream.XMLStreamReader
 
- 
 
isAttributeSpecified
public boolean isAttributeSpecified(int i)
- 
- Specified by:
- isAttributeSpecifiedin interface- javax.xml.stream.XMLStreamReader
 
- 
 
getAttributeName
public QName getAttributeName(int i)
- 
- Specified by:
- getAttributeNamein interface- javax.xml.stream.XMLStreamReader
 
- 
 
getAttributeLocalName
public String getAttributeLocalName(int i)
- 
- Specified by:
- getAttributeLocalNamein interface- javax.xml.stream.XMLStreamReader
 
- 
 
getAttributeNamespace
public String getAttributeNamespace(int i)
- 
- Specified by:
- getAttributeNamespacein interface- javax.xml.stream.XMLStreamReader
 
- 
 
getAttributePrefix
public String getAttributePrefix(int i)
- 
- Specified by:
- getAttributePrefixin interface- javax.xml.stream.XMLStreamReader
 
- 
 
getAttributeType
public String getAttributeType(int i)
- 
- Specified by:
- getAttributeTypein interface- javax.xml.stream.XMLStreamReader
 
- 
 
getAttributeValue
public String getAttributeValue(int i)
- 
- Specified by:
- getAttributeValuein interface- javax.xml.stream.XMLStreamReader
 
- 
 
getAttributeValue
public String getAttributeValue(String uri,
                                String local)
- 
- Specified by:
- getAttributeValuein interface- javax.xml.stream.XMLStreamReader
 
- 
 
getEventType
public int getEventType()
- 
- Specified by:
- getEventTypein interface- javax.xml.stream.XMLStreamReader
 
- 
 
getNamespaceCount
public int getNamespaceCount()
- 
- Specified by:
- getNamespaceCountin interface- javax.xml.stream.XMLStreamReader
 
- 
 
getText
public String getText()
- 
- Specified by:
- getTextin interface- javax.xml.stream.XMLStreamReader
 
- 
 
getTextLength
public int getTextLength()
- 
- Specified by:
- getTextLengthin interface- javax.xml.stream.XMLStreamReader
 
- 
 
getTextStart
public int getTextStart()
- 
- Specified by:
- getTextStartin interface- javax.xml.stream.XMLStreamReader
 
- 
 
getTextCharacters
public char[] getTextCharacters()
- 
- Specified by:
- getTextCharactersin interface- javax.xml.stream.XMLStreamReader
 
- 
 
getTextCharacters
public int getTextCharacters(int sourceStart,
                             char[] target,
                             int targetStart,
                             int length)
                      throws javax.xml.stream.XMLStreamException
- 
- Specified by:
- getTextCharactersin interface- javax.xml.stream.XMLStreamReader
 
- 
- Throws:
- javax.xml.stream.XMLStreamException
 
next
public int next()
         throws javax.xml.stream.XMLStreamException
- 
- Specified by:
- nextin interface- javax.xml.stream.XMLStreamReader
 
- 
- Throws:
- javax.xml.stream.XMLStreamException
 
nextTag
public int nextTag()
            throws javax.xml.stream.XMLStreamException
- 
- Specified by:
- nextTagin interface- javax.xml.stream.XMLStreamReader
 
- 
- Throws:
- javax.xml.stream.XMLStreamException
 
close
public void close()
           throws javax.xml.stream.XMLStreamException
- 
- Specified by:
- closein interface- javax.xml.stream.XMLStreamReader
 
- 
- Throws:
- javax.xml.stream.XMLStreamException
 
hasName
public boolean hasName()
- 
- Specified by:
- hasNamein interface- javax.xml.stream.XMLStreamReader
 
- 
 
hasNext
public boolean hasNext()
                throws javax.xml.stream.XMLStreamException
- 
- Specified by:
- hasNextin interface- javax.xml.stream.XMLStreamReader
 
- 
- Throws:
- javax.xml.stream.XMLStreamException
 
hasText
public boolean hasText()
- 
- Specified by:
- hasTextin interface- javax.xml.stream.XMLStreamReader
 
- 
 
isCharacters
public boolean isCharacters()
- 
- Specified by:
- isCharactersin interface- javax.xml.stream.XMLStreamReader
 
- 
 
isEndElement
public boolean isEndElement()
- 
- Specified by:
- isEndElementin interface- javax.xml.stream.XMLStreamReader
 
- 
 
isStandalone
public boolean isStandalone()
- 
- Specified by:
- isStandalonein interface- javax.xml.stream.XMLStreamReader
 
- 
 
isStartElement
public boolean isStartElement()
- 
- Specified by:
- isStartElementin interface- javax.xml.stream.XMLStreamReader
 
- 
 
isWhiteSpace
public boolean isWhiteSpace()
- 
- Specified by:
- isWhiteSpacein interface- javax.xml.stream.XMLStreamReader
 
- 
 
standaloneSet
public boolean standaloneSet()
- 
- Specified by:
- standaloneSetin interface- javax.xml.stream.XMLStreamReader
 
- 
 
getCharacterEncodingScheme
public String getCharacterEncodingScheme()
- 
- Specified by:
- getCharacterEncodingSchemein interface- javax.xml.stream.XMLStreamReader
 
- 
 
getElementText
public String getElementText()
                      throws javax.xml.stream.XMLStreamException
- 
- Specified by:
- getElementTextin interface- javax.xml.stream.XMLStreamReader
 
- 
- Throws:
- javax.xml.stream.XMLStreamException
 
getEncoding
public String getEncoding()
- 
- Specified by:
- getEncodingin interface- javax.xml.stream.XMLStreamReader
 
- 
 
getLocalName
public String getLocalName()
- 
- Specified by:
- getLocalNamein interface- javax.xml.stream.XMLStreamReader
 
- 
 
getNamespaceURI
public String getNamespaceURI()
- 
- Specified by:
- getNamespaceURIin interface- javax.xml.stream.XMLStreamReader
 
- 
 
getPIData
public String getPIData()
- 
- Specified by:
- getPIDatain interface- javax.xml.stream.XMLStreamReader
 
- 
 
getPITarget
public String getPITarget()
- 
- Specified by:
- getPITargetin interface- javax.xml.stream.XMLStreamReader
 
- 
 
getPrefix
public String getPrefix()
- 
- Specified by:
- getPrefixin interface- javax.xml.stream.XMLStreamReader
 
- 
 
getVersion
public String getVersion()
- 
- Specified by:
- getVersionin interface- javax.xml.stream.XMLStreamReader
 
- 
 
getNamespacePrefix
public String getNamespacePrefix(int i)
- 
- Specified by:
- getNamespacePrefixin interface- javax.xml.stream.XMLStreamReader
 
- 
 
getNamespaceURI
public String getNamespaceURI(int i)
- 
- Specified by:
- getNamespaceURIin interface- javax.xml.stream.XMLStreamReader
 
- 
 
getNamespaceContext
public NamespaceContext getNamespaceContext()
- 
- Specified by:
- getNamespaceContextin interface- javax.xml.stream.XMLStreamReader
 
- 
 
getName
public QName getName()
- 
- Specified by:
- getNamein interface- javax.xml.stream.XMLStreamReader
 
- 
 
getLocation
public javax.xml.stream.Location getLocation()
- 
- Specified by:
- getLocationin interface- javax.xml.stream.XMLStreamReader
 
- 
 
getProperty
public Object getProperty(String s)
                   throws IllegalArgumentException
- 
- Specified by:
- getPropertyin interface- javax.xml.stream.XMLStreamReader
 
- 
- Throws:
- IllegalArgumentException
 
require
public void require(int event,
                    String uri,
                    String local)
             throws javax.xml.stream.XMLStreamException
- 
- Specified by:
- requirein interface- javax.xml.stream.XMLStreamReader
 
- 
- Throws:
- javax.xml.stream.XMLStreamException
 
getNamespaceURI
public String getNamespaceURI(String s)
- 
- Specified by:
- getNamespaceURIin interface- javax.xml.stream.XMLStreamReader
 
- 
 
Copyright (C) Michael H. Kay. All rights reserved.