|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Objectorg.attoparser.AbstractAttoHandler
org.attoparser.markup.AbstractBasicMarkupAttoHandler
org.attoparser.markup.AbstractDetailedMarkupAttoHandler
org.attoparser.markup.trace.TracingDetailedMarkupAttoHandler
public final class TracingDetailedMarkupAttoHandler
| Field Summary | |
|---|---|
static String |
TRACE_TYPE_ATTRIBUTE
|
static String |
TRACE_TYPE_AUTOCLOSE_ELEMENT_END
|
static String |
TRACE_TYPE_AUTOCLOSE_ELEMENT_START
|
static String |
TRACE_TYPE_CDATA
|
static String |
TRACE_TYPE_CLOSE_ELEMENT_END
|
static String |
TRACE_TYPE_CLOSE_ELEMENT_START
|
static String |
TRACE_TYPE_COMMENT
|
static String |
TRACE_TYPE_DOCTYPE
|
static String |
TRACE_TYPE_DOCUMENT_END
|
static String |
TRACE_TYPE_DOCUMENT_START
|
static String |
TRACE_TYPE_INNERWHITESPACE
|
static String |
TRACE_TYPE_OPEN_ELEMENT_END
|
static String |
TRACE_TYPE_OPEN_ELEMENT_START
|
static String |
TRACE_TYPE_PROCESSINGINSTRUCTION
|
static String |
TRACE_TYPE_STANDALONE_ELEMENT_END
|
static String |
TRACE_TYPE_STANDALONE_ELEMENT_START
|
static String |
TRACE_TYPE_TEXT
|
static String |
TRACE_TYPE_UNMATCHEDCLOSE_ELEMENT_END
|
static String |
TRACE_TYPE_UNMATCHEDCLOSE_ELEMENT_START
|
static String |
TRACE_TYPE_XMLDECL
|
| Constructor Summary | |
|---|---|
TracingDetailedMarkupAttoHandler()
|
|
TracingDetailedMarkupAttoHandler(MarkupParsingConfiguration markupParsingConfiguration)
|
|
| Method Summary | |
|---|---|
List<TraceEvent> |
getTrace()
|
void |
handleAttribute(char[] buffer,
int nameOffset,
int nameLen,
int nameLine,
int nameCol,
int operatorOffset,
int operatorLen,
int operatorLine,
int operatorCol,
int valueContentOffset,
int valueContentLen,
int valueOuterOffset,
int valueOuterLen,
int valueLine,
int valueCol)
Called when an attribute is found. |
void |
handleAutoCloseElementEnd(int line,
int col)
Called for signaling the end of an auto-close element, created for balancing an unclosed tag. |
void |
handleAutoCloseElementStart(char[] buffer,
int offset,
int len,
int line,
int col)
Called for signaling the start of an auto-close element (a synthetic close tag), created for balancing an unclosed tag. |
void |
handleCDATASection(char[] buffer,
int contentOffset,
int contentLen,
int outerOffset,
int outerLen,
int line,
int col)
Called when a CDATA section is found. |
void |
handleCloseElementEnd(int line,
int col)
Called when the end of a close element (a close tag) is found. |
void |
handleCloseElementStart(char[] buffer,
int offset,
int len,
int line,
int col)
Called when the start of a close element (a close tag) is found. |
void |
handleComment(char[] buffer,
int contentOffset,
int contentLen,
int outerOffset,
int outerLen,
int line,
int col)
Called when a comment is found. |
void |
handleDocType(char[] buffer,
int keywordOffset,
int keywordLen,
int keywordLine,
int keywordCol,
int elementNameOffset,
int elementNameLen,
int elementNameLine,
int elementNameCol,
int typeOffset,
int typeLen,
int typeLine,
int typeCol,
int publicIdOffset,
int publicIdLen,
int publicIdLine,
int publicIdCol,
int systemIdOffset,
int systemIdLen,
int systemIdLine,
int systemIdCol,
int internalSubsetOffset,
int internalSubsetLen,
int internalSubsetLine,
int internalSubsetCol,
int outerOffset,
int outerLen,
int outerLine,
int outerCol)
Called when a DOCTYPE clause is found. |
void |
handleDocumentEnd(long endTimeNanos,
long totalTimeNanos,
int line,
int col,
MarkupParsingConfiguration markupParsingConfiguration)
Called when document parsing ends. |
void |
handleDocumentStart(long startTimeNanos,
int line,
int col,
MarkupParsingConfiguration markupParsingConfiguration)
Called when document parsing starts. |
void |
handleInnerWhiteSpace(char[] buffer,
int offset,
int len,
int line,
int col)
Called when an amount of white space is found inside an element. |
void |
handleOpenElementEnd(int line,
int col)
Called when the end of an open element (an open tag) is found. |
void |
handleOpenElementStart(char[] buffer,
int offset,
int len,
int line,
int col)
Called when an open element (an open tag) is found. |
void |
handleProcessingInstruction(char[] buffer,
int targetOffset,
int targetLen,
int targetLine,
int targetCol,
int contentOffset,
int contentLen,
int contentLine,
int contentCol,
int outerOffset,
int outerLen,
int line,
int col)
Called when a Processing Instruction is found. |
void |
handleStandaloneElementEnd(int line,
int col)
Called when the end of a standalone element (a minimized tag) is found |
void |
handleStandaloneElementStart(char[] buffer,
int offset,
int len,
int line,
int col)
Called when a standalone element (a minimized tag) is found. |
void |
handleText(char[] buffer,
int offset,
int len,
int line,
int col)
Called when a text artifact is found. |
void |
handleUnmatchedCloseElementEnd(int line,
int col)
Called when the end of an unmatched close element (close tag) is found. |
void |
handleUnmatchedCloseElementStart(char[] buffer,
int offset,
int len,
int line,
int col)
Called when the start of an unmatched close element (close tag) is found. |
void |
handleXmlDeclarationDetail(char[] buffer,
int keywordOffset,
int keywordLen,
int keywordLine,
int keywordCol,
int versionOffset,
int versionLen,
int versionLine,
int versionCol,
int encodingOffset,
int encodingLen,
int encodingLine,
int encodingCol,
int standaloneOffset,
int standaloneLen,
int standaloneLine,
int standaloneCol,
int outerOffset,
int outerLen,
int line,
int col)
Called when a XML Declaration is found when using a handler extending from AbstractDetailedMarkupAttoHandler. |
| Methods inherited from class org.attoparser.markup.AbstractDetailedMarkupAttoHandler |
|---|
handleCloseElement, handleDocType, handleDocumentEnd, handleDocumentStart, handleOpenElement, handleStandaloneElement, handleXmlDeclaration |
| Methods inherited from class org.attoparser.markup.AbstractBasicMarkupAttoHandler |
|---|
handleStructure |
| Methods inherited from class org.attoparser.AbstractAttoHandler |
|---|
getEndTimeNanos, getStartTimeNanos, getTotalTimeNanos, handleDocumentEnd, handleDocumentStart |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String TRACE_TYPE_DOCUMENT_START
public static final String TRACE_TYPE_DOCUMENT_END
public static final String TRACE_TYPE_STANDALONE_ELEMENT_START
public static final String TRACE_TYPE_STANDALONE_ELEMENT_END
public static final String TRACE_TYPE_OPEN_ELEMENT_START
public static final String TRACE_TYPE_OPEN_ELEMENT_END
public static final String TRACE_TYPE_CLOSE_ELEMENT_START
public static final String TRACE_TYPE_CLOSE_ELEMENT_END
public static final String TRACE_TYPE_AUTOCLOSE_ELEMENT_START
public static final String TRACE_TYPE_AUTOCLOSE_ELEMENT_END
public static final String TRACE_TYPE_UNMATCHEDCLOSE_ELEMENT_START
public static final String TRACE_TYPE_UNMATCHEDCLOSE_ELEMENT_END
public static final String TRACE_TYPE_ATTRIBUTE
public static final String TRACE_TYPE_TEXT
public static final String TRACE_TYPE_COMMENT
public static final String TRACE_TYPE_CDATA
public static final String TRACE_TYPE_XMLDECL
public static final String TRACE_TYPE_INNERWHITESPACE
public static final String TRACE_TYPE_DOCTYPE
public static final String TRACE_TYPE_PROCESSINGINSTRUCTION
| Constructor Detail |
|---|
public TracingDetailedMarkupAttoHandler()
public TracingDetailedMarkupAttoHandler(MarkupParsingConfiguration markupParsingConfiguration)
| Method Detail |
|---|
public List<TraceEvent> getTrace()
public void handleDocumentStart(long startTimeNanos,
int line,
int col,
MarkupParsingConfiguration markupParsingConfiguration)
throws AttoParseException
AbstractDetailedMarkupAttoHandlerCalled when document parsing starts.
handleDocumentStart in class AbstractDetailedMarkupAttoHandlerstartTimeNanos - the starting time, in nanoseconds.markupParsingConfiguration - the document restrictions being applied.
AttoParseException
public void handleDocumentEnd(long endTimeNanos,
long totalTimeNanos,
int line,
int col,
MarkupParsingConfiguration markupParsingConfiguration)
throws AttoParseException
AbstractDetailedMarkupAttoHandlerCalled when document parsing ends.
handleDocumentEnd in class AbstractDetailedMarkupAttoHandlerendTimeNanos - the parsing end time, in nanoseconds.totalTimeNanos - the difference between parsing start and end times.markupParsingConfiguration - the document restrictions being applied.
AttoParseException
public void handleStandaloneElementStart(char[] buffer,
int offset,
int len,
int line,
int col)
throws AttoParseException
IDetailedElementHandlingCalled when a standalone element (a minimized tag) is found. The name of the element is also reported.
Artifacts are reported using the document buffer directly, and this buffer should not be considered to be immutable, so reported structures should be copied if they need to be stored (either by copying len chars from the buffer char[] starting in offset or by creating a String from it using the same specification).
Implementations of this handler should never modify the document buffer.
handleStandaloneElementStart in interface IDetailedElementHandlinghandleStandaloneElementStart in class AbstractDetailedMarkupAttoHandlerbuffer - the document buffer (not copied)offset - the offset (position in buffer) where the element name appears.len - the length (in chars) of the element name.line - the line in the original document where this artifact starts.col - the column in the original document where this artifact starts.
AttoParseException
public void handleStandaloneElementEnd(int line,
int col)
throws AttoParseException
IDetailedElementHandlingCalled when the end of a standalone element (a minimized tag) is found
handleStandaloneElementEnd in interface IDetailedElementHandlinghandleStandaloneElementEnd in class AbstractDetailedMarkupAttoHandlerline - the line in the original document where the element ending structure appears.col - the column in the original document where the element ending structure appears.
AttoParseException
public void handleOpenElementStart(char[] buffer,
int offset,
int len,
int line,
int col)
throws AttoParseException
IDetailedElementHandlingCalled when an open element (an open tag) is found. The name of the element is also reported.
Artifacts are reported using the document buffer directly, and this buffer should not be considered to be immutable, so reported structures should be copied if they need to be stored (either by copying len chars from the buffer char[] starting in offset or by creating a String from it using the same specification).
Implementations of this handler should never modify the document buffer.
handleOpenElementStart in interface IDetailedElementHandlinghandleOpenElementStart in class AbstractDetailedMarkupAttoHandlerbuffer - the document buffer (not copied)offset - the offset (position in buffer) where the element name appears.len - the length (in chars) of the element name.line - the line in the original document where this artifact starts.col - the column in the original document where this artifact starts.
AttoParseException
public void handleOpenElementEnd(int line,
int col)
throws AttoParseException
IDetailedElementHandlingCalled when the end of an open element (an open tag) is found.
handleOpenElementEnd in interface IDetailedElementHandlinghandleOpenElementEnd in class AbstractDetailedMarkupAttoHandlerline - the line in the original document where the element ending structure appears.col - the column in the original document where the element ending structure appears.
AttoParseException
public void handleCloseElementStart(char[] buffer,
int offset,
int len,
int line,
int col)
throws AttoParseException
IDetailedElementHandlingCalled when the start of a close element (a close tag) is found. The name of the element is also reported.
Artifacts are reported using the document buffer directly, and this buffer should not be considered to be immutable, so reported structures should be copied if they need to be stored (either by copying len chars from the buffer char[] starting in offset or by creating a String from it using the same specification).
Implementations of this handler should never modify the document buffer.
handleCloseElementStart in interface IDetailedElementHandlinghandleCloseElementStart in class AbstractDetailedMarkupAttoHandlerbuffer - the document buffer (not copied)offset - the offset (position in buffer) where the element name appears.len - the length (in chars) of the element name.line - the line in the original document where this artifact starts.col - the column in the original document where this artifact starts.
AttoParseException
public void handleCloseElementEnd(int line,
int col)
throws AttoParseException
IDetailedElementHandlingCalled when the end of a close element (a close tag) is found.
handleCloseElementEnd in interface IDetailedElementHandlinghandleCloseElementEnd in class AbstractDetailedMarkupAttoHandlerline - the line in the original document where the element ending structure appears.col - the column in the original document where the element ending structure appears.
AttoParseException
public void handleAutoCloseElementStart(char[] buffer,
int offset,
int len,
int line,
int col)
throws AttoParseException
IDetailedElementHandlingCalled for signaling the start of an auto-close element (a synthetic close tag), created for balancing an unclosed tag. The name of the element is also reported.
Artifacts are reported using the document buffer directly, and this buffer should not be considered to be immutable, so reported structures should be copied if they need to be stored (either by copying len chars from the buffer char[] starting in offset or by creating a String from it using the same specification).
Implementations of this handler should never modify the document buffer.
handleAutoCloseElementStart in interface IDetailedElementHandlinghandleAutoCloseElementStart in class AbstractDetailedMarkupAttoHandlerbuffer - the document buffer (not copied)offset - the offset (position in buffer) where the element name appears.len - the length (in chars) of the element name.line - the line in the original document where this artifact starts.col - the column in the original document where this artifact starts.
AttoParseException
public void handleAutoCloseElementEnd(int line,
int col)
throws AttoParseException
IDetailedElementHandlingCalled for signaling the end of an auto-close element, created for balancing an unclosed tag.
handleAutoCloseElementEnd in interface IDetailedElementHandlinghandleAutoCloseElementEnd in class AbstractDetailedMarkupAttoHandlerline - the line in the original document where the element ending structure appears.col - the column in the original document where the element ending structure appears.
AttoParseException
public void handleUnmatchedCloseElementStart(char[] buffer,
int offset,
int len,
int line,
int col)
throws AttoParseException
IDetailedElementHandlingCalled when the start of an unmatched close element (close tag) is found. The name of the element is also reported.
Artifacts are reported using the document buffer directly, and this buffer should not be considered to be immutable, so reported structures should be copied if they need to be stored (either by copying len chars from the buffer char[] starting in offset or by creating a String from it using the same specification).
Implementations of this handler should never modify the document buffer.
handleUnmatchedCloseElementStart in interface IDetailedElementHandlinghandleUnmatchedCloseElementStart in class AbstractDetailedMarkupAttoHandlerbuffer - the document buffer (not copied)offset - the offset (position in buffer) where the element name appears.len - the length (in chars) of the element name.line - the line in the original document where this artifact starts.col - the column in the original document where this artifact starts.
AttoParseException
public void handleUnmatchedCloseElementEnd(int line,
int col)
throws AttoParseException
IDetailedElementHandlingCalled when the end of an unmatched close element (close tag) is found.
handleUnmatchedCloseElementEnd in interface IDetailedElementHandlinghandleUnmatchedCloseElementEnd in class AbstractDetailedMarkupAttoHandlerline - the line in the original document where the element ending structure appears.col - the column in the original document where the element ending structure appears.
AttoParseException
public void handleAttribute(char[] buffer,
int nameOffset,
int nameLen,
int nameLine,
int nameCol,
int operatorOffset,
int operatorLen,
int operatorLine,
int operatorCol,
int valueContentOffset,
int valueContentLen,
int valueOuterOffset,
int valueOuterLen,
int valueLine,
int valueCol)
throws AttoParseException
IAttributeSequenceHandlingCalled when an attribute is found.
Three [offset, len] pairs are provided for three partitions (name, operator, valueContent and valueOuter):
class="basic_column"
[NAM]* [VALUECONTE]| (*) = [OPERATOR]
| [VALUEOUTER--]
[OUTER-------------]
Artifacts are reported using the document buffer directly, and this buffer should not be considered to be immutable, so reported structures should be copied if they need to be stored (either by copying len chars from the buffer char[] starting in offset or by creating a String from it using the same specification).
Implementations of this handler should never modify the document buffer.
handleAttribute in interface IAttributeSequenceHandlinghandleAttribute in class AbstractDetailedMarkupAttoHandlerbuffer - the document buffer (not copied)nameOffset - offset for the name partition.nameLen - length of the name partition.nameLine - the line in the original document where the name partition starts.nameCol - the column in the original document where the name partition starts.operatorOffset - offset for the operator partition.operatorLen - length of the operator partition.operatorLine - the line in the original document where the operator partition starts.operatorCol - the column in the original document where the operator partition starts.valueContentOffset - offset for the valueContent partition.valueContentLen - length of the valueContent partition.valueOuterOffset - offset for the valueOuter partition.valueOuterLen - length of the valueOuter partition.valueLine - the line in the original document where the value (outer) partition starts.valueCol - the column in the original document where the value (outer) partition starts.
AttoParseException
public void handleText(char[] buffer,
int offset,
int len,
int line,
int col)
throws AttoParseException
IAttoHandlerCalled when a text artifact is found.
A sequence of chars is considered to be text when no structures of any kind are contained inside it. In markup parsers, for example, this means no tags (a.k.a. elements), DOCTYPE's, processing instructions, etc. are contained in the sequence.
Text sequences might include any number of new line and/or control characters.
Text artifacts are reported using the document buffer directly, and this buffer should not be considered to be immutable, so reported texts should be copied if they need to be stored (either by copying len chars from the buffer char[] starting in offset or by creating a String from it using the same specification).
Implementations of this handler should never modify the document buffer.
handleText in interface IAttoHandlerhandleText in class AbstractAttoHandlerbuffer - the document buffer (not copied)offset - the offset (position in buffer) where the text artifact starts.len - the length (in chars) of the text artifact, starting in offset.line - the line in the original document where this text artifact starts.col - the column in the original document where this text artifact starts.
AttoParseException
public void handleComment(char[] buffer,
int contentOffset,
int contentLen,
int outerOffset,
int outerLen,
int line,
int col)
throws AttoParseException
ICommentHandlingCalled when a comment is found.
Two [offset, len] pairs are provided for two partitions (outer and content):
<!-- this is a comment -->
| [CONTENT----------] |
[OUTER-------------------]
Artifacts are reported using the document buffer directly, and this buffer should not be considered to be immutable, so reported structures should be copied if they need to be stored (either by copying len chars from the buffer char[] starting in offset or by creating a String from it using the same specification).
Implementations of this handler should never modify the document buffer.
handleComment in interface ICommentHandlinghandleComment in class AbstractBasicMarkupAttoHandlerbuffer - the document buffer (not copied)contentOffset - offset for the content partition.contentLen - length of the content partition.outerOffset - offset for the outer partition.outerLen - length of the outer partition.line - the line in the original document where this artifact starts.col - the column in the original document where this artifact starts.
AttoParseException
public void handleCDATASection(char[] buffer,
int contentOffset,
int contentLen,
int outerOffset,
int outerLen,
int line,
int col)
throws AttoParseException
ICDATASectionHandlingCalled when a CDATA section is found.
Two [offset, len] pairs are provided for two partitions (outer and content):
<![CDATA[ this is a CDATA section ]]>
| [CONTENT----------------] |
[OUTER------------------------------]
Artifacts are reported using the document buffer directly, and this buffer should not be considered to be immutable, so reported structures should be copied if they need to be stored (either by copying len chars from the buffer char[] starting in offset or by creating a String from it using the same specification).
Implementations of this handler should never modify the document buffer.
handleCDATASection in interface ICDATASectionHandlinghandleCDATASection in class AbstractBasicMarkupAttoHandlerbuffer - the document buffer (not copied)contentOffset - offset for the content partition.contentLen - length of the content partition.outerOffset - offset for the outer partition.outerLen - length of the outer partition.line - the line in the original document where this artifact starts.col - the column in the original document where this artifact starts.
AttoParseException
public void handleXmlDeclarationDetail(char[] buffer,
int keywordOffset,
int keywordLen,
int keywordLine,
int keywordCol,
int versionOffset,
int versionLen,
int versionLine,
int versionCol,
int encodingOffset,
int encodingLen,
int encodingLine,
int encodingCol,
int standaloneOffset,
int standaloneLen,
int standaloneLine,
int standaloneCol,
int outerOffset,
int outerLen,
int line,
int col)
throws AttoParseException
AbstractDetailedMarkupAttoHandler
Called when a XML Declaration is found when using a handler extending from
AbstractDetailedMarkupAttoHandler.
Five [offset, len] pairs are provided for five partitions (outer, keyword, version, encoding and standalone):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
| [K] [V] [ENC] [S] |
[OUTER------------------------------------------------]
Artifacts are reported using the document buffer directly, and this buffer should not be considered to be immutable, so reported structures should be copied if they need to be stored (either by copying len chars from the buffer char[] starting in offset or by creating a String from it using the same specification).
Implementations of this handler should never modify the document buffer.
handleXmlDeclarationDetail in class AbstractDetailedMarkupAttoHandlerbuffer - the document buffer (not copied)keywordOffset - offset for the keyword partition.keywordLen - length of the keyword partition.keywordLine - the line in the original document where the keyword partition starts.keywordCol - the column in the original document where the keyword partition starts.versionOffset - offset for the version partition.versionLen - length of the version partition.versionLine - the line in the original document where the version partition starts.versionCol - the column in the original document where the version partition starts.encodingOffset - offset for the encoding partition.encodingLen - length of the encoding partition.encodingLine - the line in the original document where the encoding partition starts.encodingCol - the column in the original document where the encoding partition starts.standaloneOffset - offset for the standalone partition.standaloneLen - length of the standalone partition.standaloneLine - the line in the original document where the standalone partition starts.standaloneCol - the column in the original document where the standalone partition starts.outerOffset - offset for the outer partition.outerLen - length of the outer partition.line - the line in the original document where this artifact starts.col - the column in the original document where this artifact starts.
AttoParseException
public void handleInnerWhiteSpace(char[] buffer,
int offset,
int len,
int line,
int col)
throws AttoParseException
IAttributeSequenceHandlingCalled when an amount of white space is found inside an element.
This attribute separators can contain any amount of whitespace, including line feeds:
<div id="main" class="basic_column">
[ATTSEP]
Artifacts are reported using the document buffer directly, and this buffer should not be considered to be immutable, so reported structures should be copied if they need to be stored (either by copying len chars from the buffer char[] starting in offset or by creating a String from it using the same specification).
Implementations of this handler should never modify the document buffer.
handleInnerWhiteSpace in interface IAttributeSequenceHandlinghandleInnerWhiteSpace in class AbstractDetailedMarkupAttoHandlerbuffer - the document buffer (not copied)offset - offset for the artifact.len - length of the artifact.line - the line in the original document where the artifact starts.col - the column in the original document where the artifact starts.
AttoParseException
public void handleDocType(char[] buffer,
int keywordOffset,
int keywordLen,
int keywordLine,
int keywordCol,
int elementNameOffset,
int elementNameLen,
int elementNameLine,
int elementNameCol,
int typeOffset,
int typeLen,
int typeLine,
int typeCol,
int publicIdOffset,
int publicIdLen,
int publicIdLine,
int publicIdCol,
int systemIdOffset,
int systemIdLen,
int systemIdLine,
int systemIdCol,
int internalSubsetOffset,
int internalSubsetLen,
int internalSubsetLine,
int internalSubsetCol,
int outerOffset,
int outerLen,
int outerLine,
int outerCol)
throws AttoParseException
IDetailedDocTypeHandlingCalled when a DOCTYPE clause is found.
This method reports the DOCTYPE clause splitting it into its different parts.
Seven [offset, len] pairs are provided for seven partitions (outer, keyword, elementName, type, publicId, systemId and internalSubset) of the DOCTYPE clause:
<!DOCTYPE html PUBLIC ".........." ".........." [................]>
| [KEYWO] [EN] [TYPE] [PUBLICID] [SYSTEMID] [INTERNALSUBSET] |
[OUTER------------------------------------------------------------]
Artifacts are reported using the document buffer directly, and this buffer should not be considered to be immutable, so reported structures should be copied if they need to be stored (either by copying len chars from the buffer char[] starting in offset or by creating a String from it using the same specification).
Implementations of this handler should never modify the document buffer.
handleDocType in interface IDetailedDocTypeHandlinghandleDocType in class AbstractDetailedMarkupAttoHandlerbuffer - the document buffer (not copied)keywordOffset - offset for the keyword partition.keywordLen - length of the keyword partition.keywordLine - the line in the original document where the keyword partition starts.keywordCol - the column in the original document where the keyword partition starts.elementNameOffset - offset for the elementName partition.elementNameLen - length of the elementName partition.elementNameLine - the line in the original document where the elementName partition starts.elementNameCol - the column in the original document where the elementName partition starts.typeOffset - offset for the type partition.typeLen - length of the type partition.typeLine - the line in the original document where the type partition starts.typeCol - the column in the original document where the type partition starts.publicIdOffset - offset for the publicId partition.publicIdLen - length of the publicId partition.publicIdLine - the line in the original document where the publicId partition starts.publicIdCol - the column in the original document where the publicId partition starts.systemIdOffset - offset for the systemId partition.systemIdLen - length of the systemId partition.systemIdLine - the line in the original document where the systemId partition starts.systemIdCol - the column in the original document where the systemId partition starts.internalSubsetOffset - offset for the internalSubsetId partition.internalSubsetLen - length of the internalSubsetId partition.internalSubsetLine - the line in the original document where the internalSubsetId partition starts.internalSubsetCol - the column in the original document where the internalSubsetId partition starts.outerOffset - offset for the outer partition.outerLen - length of the outer partition.outerLine - the line in the original document where this artifact starts.outerCol - the column in the original document where this artifact starts.
AttoParseException
public void handleProcessingInstruction(char[] buffer,
int targetOffset,
int targetLen,
int targetLine,
int targetCol,
int contentOffset,
int contentLen,
int contentLine,
int contentCol,
int outerOffset,
int outerLen,
int line,
int col)
throws AttoParseException
IProcessingInstructionHandlingCalled when a Processing Instruction is found.
Three [offset, len] pairs are provided for three partitions (outer, target and content):
<?xls-stylesheet somePar1="a" somePar2="b"?>
| [TARGET------] [CONTENT----------------] |
[OUTER-------------------------------------]
Note that, although XML Declarations have the same format as processing instructions,
they are not considered as such and therefore are handled by a different interface
(IXmlDeclarationHandling).
Artifacts are reported using the document buffer directly, and this buffer should not be considered to be immutable, so reported structures should be copied if they need to be stored (either by copying len chars from the buffer char[] starting in offset or by creating a String from it using the same specification).
Implementations of this handler should never modify the document buffer.
handleProcessingInstruction in interface IProcessingInstructionHandlinghandleProcessingInstruction in class AbstractBasicMarkupAttoHandlerbuffer - the document buffer (not copied)targetOffset - offset for the target partition.targetLen - length of the target partition.targetLine - the line in the original document where the target partition starts.targetCol - the column in the original document where the target partition starts.contentOffset - offset for the content partition.contentLen - length of the content partition.contentLine - the line in the original document where the content partition starts.contentCol - the column in the original document where the content partition starts.outerOffset - offset for the outer partition.outerLen - length of the outer partition.line - the line in the original document where this artifact starts.col - the column in the original document where this artifact starts.
AttoParseException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||