public abstract class BaseStreamWriter extends org.codehaus.stax2.ri.Stax2WriterImpl implements org.codehaus.stax2.validation.ValidationContext, OutputConfigFlags
XMLStreamWriter implementations Woodstox has.
 Contains partial stream writer implementation, plus utility methods
 shared by concrete implementation classes. Main reason for such
 abstract base class is to allow other parts of Woodstox core to refer
 to any of stream writer implementations in general way.| Modifier and Type | Field and Description | 
|---|---|
| protected static int | ATTR_MIN_ARRAYCOPY | 
| protected static char | CHAR_SPACE | 
| protected static int | DEFAULT_COPYBUFFER_LEN | 
| protected boolean | mAnyOutputFlag that is set to true first time something has been output. | 
| protected boolean | mCfgAutomaticEmptyElems | 
| protected boolean | mCfgCDataAsText | 
| protected boolean | mCfgCopyDefaultAttrs | 
| protected boolean | mCheckAttrs | 
| protected boolean | mCheckStructure | 
| protected WriterConfig | mConfig | 
| protected char[] | mCopyBufferIntermediate buffer into which characters of a String can be
 copied, in cases where such a copy followed by array access
 is faster than calling  String.charAt()(which
 perhaps surprisingly is often case, and especially significant
 for longer buffers). | 
| protected String | mDtdRootElemValue passed as the expected root element, when using the multiple
 argument  writeDTD(java.lang.String)method. | 
| protected boolean | mEmptyElementFlag that indicates that current element is an empty element (one
 that is explicitly defined as one, by calling a method -- NOT one
 that just happens to be empty). | 
| protected String | mEncodingEncoding to use; may be passed from the factory (when
 a method that defines encoding is used), updated by
 a call to  writeStartDocument(), or null if
 neither. | 
| protected static int | MIN_ARRAYCOPYThis constant defines minimum length of a String, for which it
 is beneficial to do an intermediate copy (using String.getChars()),
 and iterate over intermediate array, instead of iterating using
 String.charAt(). | 
| protected boolean | mReturnNullForDefaultNamespace | 
| protected boolean | mStartElementOpenFlag that is set during time that a start element is "open", ie. | 
| protected int | mState | 
| protected org.codehaus.stax2.validation.XMLValidator | mValidatorOptional validator to use for validating output against
 one or more schemas, and/or for safe pretty-printing (indentation). | 
| protected int | mVldContentState value used with validation, to track types of content
 that is allowed at this point in output stream. | 
| protected org.codehaus.stax2.validation.ValidationProblemHandler | mVldProbHandlerCustom validation problem handler, if any. | 
| protected XmlWriter | mWriterActual physical writer to output serialized XML content to | 
| protected boolean | mXml11Since XML 1.1 has some differences to 1.0, we need to keep a flag
 to indicate if we were to output XML 1.1 document. | 
| protected static int | STATE_EPILOG | 
| protected static int | STATE_PROLOG | 
| protected static int | STATE_TREE | 
CFG_ADD_SPACE_AFTER_EMPTY_ELEM, CFG_AUTO_CLOSE_OUTPUT, CFG_AUTOMATIC_EMPTY_ELEMENTS, CFG_AUTOMATIC_END_ELEMENTS, CFG_AUTOMATIC_NS, CFG_COPY_DEFAULT_ATTRS, CFG_ENABLE_NS, CFG_ESCAPE_CR, CFG_FIX_CONTENT, CFG_OUTPUT_CDATA_AS_TEXT, CFG_USE_DOUBLE_QUOTES_IN_XML_DECL, CFG_VALIDATE_ATTR, CFG_VALIDATE_CONTENT, CFG_VALIDATE_NAMES, CFG_VALIDATE_STRUCTUREATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT| Modifier | Constructor and Description | 
|---|---|
| protected  | BaseStreamWriter(XmlWriter xw,
                String enc,
                WriterConfig cfg) | 
| Modifier and Type | Method and Description | 
|---|---|
| int | addDefaultAttribute(String localName,
                   String uri,
                   String prefix,
                   String value)Adding default attribute values does not usually make sense on
 output side, so the implementation is a NOP for now. | 
| void | close() | 
| void | closeCompletely() | 
| protected abstract void | closeStartElement(boolean emptyElem)Method called to close an open start element, when another
 main-level element (not namespace declaration or attribute)
 is being output; except for end element which is handled differently. | 
| void | copyEventFromReader(org.codehaus.stax2.XMLStreamReader2 sr,
                   boolean preserveEventData)Method that essentially copies event that the specified reader has
 just read. | 
| abstract void | copyStartElement(InputElementStack elemStack,
                AttributeCollector attrCollector)Implementation-dependant method called to fully copy START_ELEMENT
 event that the passed-in stream reader points to | 
| protected void | doReportProblem(XMLReporter rep,
               String probType,
               String msg,
               Location loc) | 
| protected void | doReportProblem(XMLReporter rep,
               org.codehaus.stax2.validation.XMLValidationProblem prob) | 
| protected void | doWriteStartDocument(String version,
                    String encoding,
                    String standAlone) | 
| int | findAttributeIndex(String nsURI,
                  String localName) | 
| void | flush() | 
| int | getAttributeCount() | 
| String | getAttributeLocalName(int index) | 
| String | getAttributeNamespace(int index) | 
| String | getAttributePrefix(int index) | 
| String | getAttributeType(int index) | 
| String | getAttributeValue(int index) | 
| String | getAttributeValue(String nsURI,
                 String localName) | 
| String | getBaseUri()As of now, there is no way to specify the base URI. | 
| protected char[] | getCopyBuffer() | 
| protected char[] | getCopyBuffer(int minLen) | 
| abstract QName | getCurrentElementName() | 
| String | getEncoding() | 
| org.codehaus.stax2.XMLStreamLocation2 | getLocation() | 
| abstract NamespaceContext | getNamespaceContext() | 
| abstract String | getNamespaceURI(String prefix) | 
| abstract String | getPrefix(String uri) | 
| Object | getProperty(String name) | 
| protected abstract String | getTopElementDesc()Method needed for error message generation | 
| Location | getValidationLocation() | 
| String | getXmlVersion() | 
| protected boolean | inPrologOrEpilog() | 
| boolean | isNotationDeclared(String name) | 
| boolean | isPropertySupported(String name) | 
| boolean | isUnparsedEntityDeclared(String name) | 
| protected boolean | isValidating()Method that is used by output classes to determine whether we
 are in validating mode. | 
| protected static void | reportIllegalArg(String msg) | 
| protected static void | reportIllegalMethod(String msg)Method called when an illegal method (namespace-specific method
 on non-ns writer) is called by the application. | 
| protected void | reportInvalidContent(int evtType) | 
| protected static void | reportNwfAttr(String msg)This is the method called when an output method call violates
 attribute well-formedness checks (trying to output dup attrs)
 and  WstxOutputProperties.P_OUTPUT_VALIDATE_NAMESis
 is enabled. | 
| protected static void | reportNwfAttr(String msg,
             Object arg) | 
| protected static void | reportNwfContent(String msg)This is the method called when an output method call violates
 content well-formedness checks
 and  WstxOutputProperties.P_OUTPUT_VALIDATE_CONTENTis
 is enabled. | 
| protected static void | reportNwfContent(String msg,
                Object arg) | 
| protected static void | reportNwfStructure(String msg)This is the method called when an output method call violates
 structural well-formedness checks
 and  WstxOutputProperties.P_OUTPUT_VALIDATE_STRUCTUREis
 is enabled. | 
| protected static void | reportNwfStructure(String msg,
                  Object arg) | 
| void | reportProblem(org.codehaus.stax2.validation.XMLValidationProblem prob) | 
| void | reportValidationProblem(Location loc,
                       String msg) | 
| void | reportValidationProblem(String msg) | 
| void | reportValidationProblem(String msg,
                       int severity) | 
| void | reportValidationProblem(String msg,
                       Location loc,
                       int severity) | 
| void | reportValidationProblem(String format,
                       Object arg) | 
| void | reportValidationProblem(String format,
                       Object arg,
                       Object arg2) | 
| abstract void | setDefaultNamespace(String uri) | 
| abstract void | setNamespaceContext(NamespaceContext context) | 
| abstract void | setPrefix(String prefix,
         String uri) | 
| boolean | setProperty(String name,
           Object value) | 
| org.codehaus.stax2.validation.ValidationProblemHandler | setValidationProblemHandler(org.codehaus.stax2.validation.ValidationProblemHandler h) | 
| org.codehaus.stax2.validation.XMLValidator | stopValidatingAgainst(org.codehaus.stax2.validation.XMLValidationSchema schema) | 
| org.codehaus.stax2.validation.XMLValidator | stopValidatingAgainst(org.codehaus.stax2.validation.XMLValidator validator) | 
| protected static void | throwFromIOE(IOException ioe) | 
| protected static void | throwOutputError(String msg) | 
| protected static void | throwOutputError(String format,
                Object arg) | 
| String | toString() | 
| org.codehaus.stax2.validation.XMLValidator | validateAgainst(org.codehaus.stax2.validation.XMLValidationSchema schema) | 
| abstract String | validateQNamePrefix(QName name)Method called before writing a QName via Typed Access API. | 
| protected void | verifyRootElement(String localName,
                 String prefix) | 
| protected void | verifyWriteCData() | 
| protected void | verifyWriteDTD() | 
| Writer | wrapAsRawWriter()Method that can be called to get a wrapper instance that
 can be used to essentially call the  writeRawmethod via regularWriterinterface. | 
| Writer | wrapAsTextWriter()Method that can be called to get a wrapper instance that
 can be used to essentially call the  writeCharactersmethod via regularWriterinterface. | 
| abstract void | writeAttribute(String localName,
              String value) | 
| abstract void | writeAttribute(String nsURI,
              String localName,
              String value) | 
| abstract void | writeAttribute(String prefix,
              String nsURI,
              String localName,
              String value) | 
| void | writeCData(char[] cbuf,
          int start,
          int len) | 
| void | writeCData(String data) | 
| void | writeCharacters(char[] text,
               int start,
               int len) | 
| void | writeCharacters(Characters ch)Method called by  XMLEventWriter(instead of more generic
 text output methods), so that we can verify (if necessary) that
 this character output type is legal in this context. | 
| void | writeCharacters(String text) | 
| void | writeComment(String data) | 
| abstract void | writeDefaultNamespace(String nsURI) | 
| void | writeDTD(org.codehaus.stax2.DTDInfo info) | 
| void | writeDTD(String dtd) | 
| void | writeDTD(String rootName,
        String systemId,
        String publicId,
        String internalSubset) | 
| abstract void | writeEmptyElement(String localName) | 
| abstract void | writeEmptyElement(String nsURI,
                 String localName) | 
| abstract void | writeEmptyElement(String prefix,
                 String localName,
                 String nsURI) | 
| void | writeEndDocument() | 
| abstract void | writeEndElement() | 
| abstract void | writeEndElement(QName name)Method called by  XMLEventWriter(instead of the version
 that takes no argument), so that we can verify it does match the
 start element if necessary. | 
| void | writeEntityRef(String name) | 
| abstract void | writeFullEndElement() | 
| abstract void | writeNamespace(String prefix,
              String nsURI) | 
| void | writeProcessingInstruction(String target) | 
| void | writeProcessingInstruction(String target,
                          String data) | 
| void | writeRaw(char[] text,
        int start,
        int offset) | 
| void | writeRaw(String text) | 
| void | writeRaw(String text,
        int start,
        int offset) | 
| void | writeSpace(char[] text,
          int offset,
          int length) | 
| void | writeSpace(String text) | 
| void | writeStartDocument() | 
| void | writeStartDocument(String version) | 
| void | writeStartDocument(String encoding,
                  String version) | 
| void | writeStartDocument(String version,
                  String encoding,
                  boolean standAlone) | 
| abstract void | writeStartElement(StartElement elem)Convenience method needed by  XMLEventWriterimplementation, to use when
 writing a start element, and possibly its attributes and namespace
 declarations. | 
| abstract void | writeStartElement(String localName) | 
| abstract void | writeStartElement(String nsURI,
                 String localName) | 
| abstract void | writeStartElement(String prefix,
                 String localName,
                 String nsURI) | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitwriteBinary, writeBinary, writeBinaryAttribute, writeBinaryAttribute, writeBoolean, writeBooleanAttribute, writeDecimal, writeDecimalAttribute, writeDouble, writeDoubleArray, writeDoubleArrayAttribute, writeDoubleAttribute, writeFloat, writeFloatArray, writeFloatArrayAttribute, writeFloatAttribute, writeInt, writeIntArray, writeIntArrayAttribute, writeIntAttribute, writeInteger, writeIntegerAttribute, writeLong, writeLongArray, writeLongArrayAttribute, writeLongAttribute, writeQName, writeQNameAttributeprotected static final int STATE_PROLOG
protected static final int STATE_TREE
protected static final int STATE_EPILOG
protected static final char CHAR_SPACE
protected static final int MIN_ARRAYCOPY
protected static final int ATTR_MIN_ARRAYCOPY
protected static final int DEFAULT_COPYBUFFER_LEN
protected final XmlWriter mWriter
protected char[] mCopyBuffer
String.charAt() (which
 perhaps surprisingly is often case, and especially significant
 for longer buffers).protected final WriterConfig mConfig
protected final boolean mCfgCDataAsText
protected final boolean mCfgCopyDefaultAttrs
protected final boolean mCfgAutomaticEmptyElems
protected boolean mCheckStructure
protected boolean mCheckAttrs
protected String mEncoding
writeStartDocument(), or null if
 neither. Is passed to the escaping writer factory to
 allow escaping writers to do additional escaping if
 necessary (like encapsulating non-ascii chars in a doc
 encoded usig ascii).protected org.codehaus.stax2.validation.XMLValidator mValidator
protected boolean mXml11
protected org.codehaus.stax2.validation.ValidationProblemHandler mVldProbHandler
protected int mState
protected boolean mAnyOutput
protected boolean mStartElementOpen
protected boolean mEmptyElement
protected int mVldContent
protected String mDtdRootElem
writeDTD(java.lang.String) method. Will be used in structurally
 validating mode (and in dtd-validating mode, since that automatically
 enables structural validation as well, to pre-filter well-formedness
 errors that validators might have trouble dealing with).protected boolean mReturnNullForDefaultNamespace
protected BaseStreamWriter(XmlWriter xw, String enc, WriterConfig cfg)
public void close()
           throws XMLStreamException
close in interface XMLStreamWriterXMLStreamExceptionpublic void flush()
           throws XMLStreamException
flush in interface XMLStreamWriterXMLStreamExceptionpublic abstract NamespaceContext getNamespaceContext()
getNamespaceContext in interface XMLStreamWriterpublic abstract String getPrefix(String uri)
getPrefix in interface XMLStreamWriterpublic Object getProperty(String name)
getProperty in interface XMLStreamWriterpublic abstract void setDefaultNamespace(String uri) throws XMLStreamException
setDefaultNamespace in interface XMLStreamWriterXMLStreamExceptionpublic abstract void setNamespaceContext(NamespaceContext context) throws XMLStreamException
setNamespaceContext in interface XMLStreamWriterXMLStreamExceptionpublic abstract void setPrefix(String prefix, String uri) throws XMLStreamException
setPrefix in interface XMLStreamWriterXMLStreamExceptionpublic abstract void writeAttribute(String localName, String value) throws XMLStreamException
writeAttribute in interface XMLStreamWriterXMLStreamExceptionpublic abstract void writeAttribute(String nsURI, String localName, String value) throws XMLStreamException
writeAttribute in interface XMLStreamWriterXMLStreamExceptionpublic abstract void writeAttribute(String prefix, String nsURI, String localName, String value) throws XMLStreamException
writeAttribute in interface XMLStreamWriterXMLStreamExceptionpublic void writeCData(String data) throws XMLStreamException
writeCData in interface XMLStreamWriterXMLStreamExceptionpublic void writeCharacters(char[] text,
                   int start,
                   int len)
                     throws XMLStreamException
writeCharacters in interface XMLStreamWriterXMLStreamExceptionpublic void writeCharacters(String text) throws XMLStreamException
writeCharacters in interface XMLStreamWriterXMLStreamExceptionpublic void writeComment(String data) throws XMLStreamException
writeComment in interface XMLStreamWriterXMLStreamExceptionpublic abstract void writeDefaultNamespace(String nsURI) throws XMLStreamException
writeDefaultNamespace in interface XMLStreamWriterXMLStreamExceptionpublic void writeDTD(String dtd) throws XMLStreamException
writeDTD in interface XMLStreamWriterXMLStreamExceptionpublic abstract void writeEmptyElement(String localName) throws XMLStreamException
writeEmptyElement in interface XMLStreamWriterXMLStreamExceptionpublic abstract void writeEmptyElement(String nsURI, String localName) throws XMLStreamException
writeEmptyElement in interface XMLStreamWriterXMLStreamExceptionpublic abstract void writeEmptyElement(String prefix, String localName, String nsURI) throws XMLStreamException
writeEmptyElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeEndDocument()
                      throws XMLStreamException
writeEndDocument in interface XMLStreamWriterXMLStreamExceptionpublic abstract void writeEndElement()
                              throws XMLStreamException
writeEndElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeEntityRef(String name) throws XMLStreamException
writeEntityRef in interface XMLStreamWriterXMLStreamExceptionpublic abstract void writeNamespace(String prefix, String nsURI) throws XMLStreamException
writeNamespace in interface XMLStreamWriterXMLStreamExceptionpublic void writeProcessingInstruction(String target) throws XMLStreamException
writeProcessingInstruction in interface XMLStreamWriterXMLStreamExceptionpublic void writeProcessingInstruction(String target, String data) throws XMLStreamException
writeProcessingInstruction in interface XMLStreamWriterXMLStreamExceptionpublic void writeStartDocument()
                        throws XMLStreamException
writeStartDocument in interface XMLStreamWriterXMLStreamExceptionpublic void writeStartDocument(String version) throws XMLStreamException
writeStartDocument in interface XMLStreamWriterXMLStreamExceptionpublic void writeStartDocument(String encoding, String version) throws XMLStreamException
writeStartDocument in interface XMLStreamWriterXMLStreamExceptionprotected void doWriteStartDocument(String version, String encoding, String standAlone) throws XMLStreamException
XMLStreamExceptionpublic abstract void writeStartElement(String localName) throws XMLStreamException
writeStartElement in interface XMLStreamWriterXMLStreamExceptionpublic abstract void writeStartElement(String nsURI, String localName) throws XMLStreamException
writeStartElement in interface XMLStreamWriterXMLStreamExceptionpublic abstract void writeStartElement(String prefix, String localName, String nsURI) throws XMLStreamException
writeStartElement in interface XMLStreamWriterXMLStreamExceptionpublic void copyEventFromReader(org.codehaus.stax2.XMLStreamReader2 sr,
                       boolean preserveEventData)
                         throws XMLStreamException
copyEventFromReader in interface org.codehaus.stax2.XMLStreamWriter2copyEventFromReader in class org.codehaus.stax2.ri.Stax2WriterImplsr - Stream reader to use for accessing event to copypreserveEventData - If true, writer is not allowed to change
   the state of the reader (so that all the data associated with the
   current event has to be preserved); if false, writer is allowed
   to use methods that may cause some data to be discarded. Setting
   this to false may improve the performance, since it may allow
   full no-copy streaming of data, especially textual contents.XMLStreamExceptionpublic void closeCompletely()
                     throws XMLStreamException
closeCompletely in interface org.codehaus.stax2.XMLStreamWriter2XMLStreamExceptionpublic boolean isPropertySupported(String name)
isPropertySupported in interface org.codehaus.stax2.XMLStreamWriter2isPropertySupported in class org.codehaus.stax2.ri.Stax2WriterImplpublic boolean setProperty(String name, Object value)
setProperty in interface org.codehaus.stax2.XMLStreamWriter2setProperty in class org.codehaus.stax2.ri.Stax2WriterImplname - Name of the property to setvalue - Value to set property to.public org.codehaus.stax2.validation.XMLValidator validateAgainst(org.codehaus.stax2.validation.XMLValidationSchema schema)
                                                           throws XMLStreamException
validateAgainst in interface org.codehaus.stax2.validation.ValidatablevalidateAgainst in class org.codehaus.stax2.ri.Stax2WriterImplXMLStreamExceptionpublic org.codehaus.stax2.validation.XMLValidator stopValidatingAgainst(org.codehaus.stax2.validation.XMLValidationSchema schema)
                                                                 throws XMLStreamException
stopValidatingAgainst in interface org.codehaus.stax2.validation.ValidatablestopValidatingAgainst in class org.codehaus.stax2.ri.Stax2WriterImplXMLStreamExceptionpublic org.codehaus.stax2.validation.XMLValidator stopValidatingAgainst(org.codehaus.stax2.validation.XMLValidator validator)
                                                                 throws XMLStreamException
stopValidatingAgainst in interface org.codehaus.stax2.validation.ValidatablestopValidatingAgainst in class org.codehaus.stax2.ri.Stax2WriterImplXMLStreamExceptionpublic org.codehaus.stax2.validation.ValidationProblemHandler setValidationProblemHandler(org.codehaus.stax2.validation.ValidationProblemHandler h)
setValidationProblemHandler in interface org.codehaus.stax2.validation.ValidatablesetValidationProblemHandler in class org.codehaus.stax2.ri.Stax2WriterImplpublic org.codehaus.stax2.XMLStreamLocation2 getLocation()
getLocation in interface org.codehaus.stax2.XMLStreamWriter2getLocation in class org.codehaus.stax2.ri.Stax2WriterImplpublic String getEncoding()
getEncoding in interface org.codehaus.stax2.XMLStreamWriter2getEncoding in class org.codehaus.stax2.ri.Stax2WriterImplpublic void writeCData(char[] cbuf,
              int start,
              int len)
                throws XMLStreamException
writeCData in interface org.codehaus.stax2.XMLStreamWriter2writeCData in class org.codehaus.stax2.ri.Stax2WriterImplXMLStreamExceptionpublic void writeDTD(org.codehaus.stax2.DTDInfo info)
              throws XMLStreamException
XMLStreamExceptionpublic void writeDTD(String rootName, String systemId, String publicId, String internalSubset) throws XMLStreamException
writeDTD in interface org.codehaus.stax2.XMLStreamWriter2writeDTD in class org.codehaus.stax2.ri.Stax2WriterImplXMLStreamExceptionpublic abstract void writeFullEndElement()
                                  throws XMLStreamException
writeFullEndElement in interface org.codehaus.stax2.XMLStreamWriter2writeFullEndElement in class org.codehaus.stax2.ri.Stax2WriterImplXMLStreamExceptionpublic void writeStartDocument(String version, String encoding, boolean standAlone) throws XMLStreamException
writeStartDocument in interface org.codehaus.stax2.XMLStreamWriter2writeStartDocument in class org.codehaus.stax2.ri.Stax2WriterImplXMLStreamExceptionpublic void writeRaw(String text) throws XMLStreamException
writeRaw in interface org.codehaus.stax2.XMLStreamWriter2writeRaw in class org.codehaus.stax2.ri.Stax2WriterImplXMLStreamExceptionpublic void writeRaw(String text, int start, int offset) throws XMLStreamException
writeRaw in interface org.codehaus.stax2.XMLStreamWriter2writeRaw in class org.codehaus.stax2.ri.Stax2WriterImplXMLStreamExceptionpublic void writeRaw(char[] text,
            int start,
            int offset)
              throws XMLStreamException
writeRaw in interface org.codehaus.stax2.XMLStreamWriter2writeRaw in class org.codehaus.stax2.ri.Stax2WriterImplXMLStreamExceptionpublic void writeSpace(String text) throws XMLStreamException
writeSpace in interface org.codehaus.stax2.XMLStreamWriter2writeSpace in class org.codehaus.stax2.ri.Stax2WriterImplXMLStreamExceptionpublic void writeSpace(char[] text,
              int offset,
              int length)
                throws XMLStreamException
writeSpace in interface org.codehaus.stax2.XMLStreamWriter2writeSpace in class org.codehaus.stax2.ri.Stax2WriterImplXMLStreamExceptionpublic String getXmlVersion()
getXmlVersion in interface org.codehaus.stax2.validation.ValidationContextpublic abstract QName getCurrentElementName()
getCurrentElementName in interface org.codehaus.stax2.validation.ValidationContextpublic abstract String getNamespaceURI(String prefix)
getNamespaceURI in interface org.codehaus.stax2.validation.ValidationContextpublic String getBaseUri()
getBaseUri in interface org.codehaus.stax2.validation.ValidationContextpublic Location getValidationLocation()
getValidationLocation in interface org.codehaus.stax2.validation.ValidationContextpublic void reportProblem(org.codehaus.stax2.validation.XMLValidationProblem prob)
                   throws XMLStreamException
reportProblem in interface org.codehaus.stax2.validation.ValidationContextXMLStreamExceptionpublic int addDefaultAttribute(String localName, String uri, String prefix, String value)
addDefaultAttribute in interface org.codehaus.stax2.validation.ValidationContextpublic boolean isNotationDeclared(String name)
isNotationDeclared in interface org.codehaus.stax2.validation.ValidationContextpublic boolean isUnparsedEntityDeclared(String name)
isUnparsedEntityDeclared in interface org.codehaus.stax2.validation.ValidationContextpublic int getAttributeCount()
getAttributeCount in interface org.codehaus.stax2.validation.ValidationContextpublic String getAttributeLocalName(int index)
getAttributeLocalName in interface org.codehaus.stax2.validation.ValidationContextpublic String getAttributeNamespace(int index)
getAttributeNamespace in interface org.codehaus.stax2.validation.ValidationContextpublic String getAttributePrefix(int index)
getAttributePrefix in interface org.codehaus.stax2.validation.ValidationContextpublic String getAttributeValue(int index)
getAttributeValue in interface org.codehaus.stax2.validation.ValidationContextpublic String getAttributeValue(String nsURI, String localName)
getAttributeValue in interface org.codehaus.stax2.validation.ValidationContextpublic String getAttributeType(int index)
getAttributeType in interface org.codehaus.stax2.validation.ValidationContextpublic int findAttributeIndex(String nsURI, String localName)
findAttributeIndex in interface org.codehaus.stax2.validation.ValidationContextpublic final Writer wrapAsRawWriter()
writeRaw
 method via regular Writer interface.public final Writer wrapAsTextWriter()
writeCharacters
 method via regular Writer interface.protected boolean isValidating()
Note: current implementation of this method is not perfect; it may be possible it can return true even if we are only using a DTD to get some limited info, without validating?
public abstract void writeStartElement(StartElement elem) throws XMLStreamException
XMLEventWriter
 implementation, to use when
 writing a start element, and possibly its attributes and namespace
 declarations.XMLStreamExceptionpublic abstract void writeEndElement(QName name) throws XMLStreamException
XMLEventWriter
 (instead of the version
 that takes no argument), so that we can verify it does match the
 start element if necessary.XMLStreamExceptionpublic void writeCharacters(Characters ch) throws XMLStreamException
XMLEventWriter
 (instead of more generic
 text output methods), so that we can verify (if necessary) that
 this character output type is legal in this context. Specifically,
 it's not acceptable to add non-whitespace content outside root
 element (in prolog/epilog).
 Note: cut'n pasted from the main writeCharacters; not
 good... but done to optimize white-space cases.
XMLStreamExceptionprotected abstract void closeStartElement(boolean emptyElem)
                                   throws XMLStreamException
XMLStreamExceptionprotected final boolean inPrologOrEpilog()
public abstract void copyStartElement(InputElementStack elemStack, AttributeCollector attrCollector) throws IOException, XMLStreamException
IOExceptionXMLStreamExceptionpublic abstract String validateQNamePrefix(QName name) throws XMLStreamException
XMLStreamExceptionprotected final void verifyWriteCData()
                               throws XMLStreamException
XMLStreamExceptionprotected final void verifyWriteDTD()
                             throws XMLStreamException
XMLStreamExceptionprotected void verifyRootElement(String localName, String prefix) throws XMLStreamException
XMLStreamExceptionprotected static void throwOutputError(String msg) throws XMLStreamException
XMLStreamExceptionprotected static void throwOutputError(String format, Object arg) throws XMLStreamException
XMLStreamExceptionprotected static void reportIllegalMethod(String msg) throws XMLStreamException
XMLStreamExceptionprotected static void reportNwfStructure(String msg) throws XMLStreamException
WstxOutputProperties.P_OUTPUT_VALIDATE_STRUCTURE is
 is enabled.XMLStreamExceptionprotected static void reportNwfStructure(String msg, Object arg) throws XMLStreamException
XMLStreamExceptionprotected static void reportNwfContent(String msg) throws XMLStreamException
WstxOutputProperties.P_OUTPUT_VALIDATE_CONTENT is
 is enabled.XMLStreamExceptionprotected static void reportNwfContent(String msg, Object arg) throws XMLStreamException
XMLStreamExceptionprotected static void reportNwfAttr(String msg) throws XMLStreamException
WstxOutputProperties.P_OUTPUT_VALIDATE_NAMES is
 is enabled.XMLStreamExceptionprotected static void reportNwfAttr(String msg, Object arg) throws XMLStreamException
XMLStreamExceptionprotected static void throwFromIOE(IOException ioe) throws XMLStreamException
XMLStreamExceptionprotected static void reportIllegalArg(String msg) throws IllegalArgumentException
IllegalArgumentExceptionprotected void reportInvalidContent(int evtType)
                             throws XMLStreamException
XMLStreamExceptionpublic void reportValidationProblem(String msg, Location loc, int severity) throws XMLStreamException
XMLStreamExceptionpublic void reportValidationProblem(String msg, int severity) throws XMLStreamException
XMLStreamExceptionpublic void reportValidationProblem(String msg) throws XMLStreamException
XMLStreamExceptionpublic void reportValidationProblem(Location loc, String msg) throws XMLStreamException
XMLStreamExceptionpublic void reportValidationProblem(String format, Object arg) throws XMLStreamException
XMLStreamExceptionpublic void reportValidationProblem(String format, Object arg, Object arg2) throws XMLStreamException
XMLStreamExceptionprotected void doReportProblem(XMLReporter rep, String probType, String msg, Location loc) throws XMLStreamException
XMLStreamExceptionprotected void doReportProblem(XMLReporter rep, org.codehaus.stax2.validation.XMLValidationProblem prob) throws XMLStreamException
XMLStreamExceptionprotected abstract String getTopElementDesc()
protected final char[] getCopyBuffer()
protected final char[] getCopyBuffer(int minLen)
Copyright © 2018 FasterXML. All rights reserved.