org.attoparser.markup
Interface IProcessingInstructionHandling

All Known Implementing Classes:
AbstractBasicMarkupAttoHandler, AbstractDetailedMarkupAttoHandler, AbstractDetailedNonValidatingHtmlAttoHandler, AbstractDetailedXmlAttoHandler, AbstractStandardMarkupAttoHandler, AbstractStandardNonValidatingHtmlAttoHandler, AbstractStandardXmlAttoHandler, DOMXmlAttoHandler, DuplicatingBasicMarkupAttoHandler, DuplicatingDetailedMarkupAttoHandler, HtmlCodeDisplayAttoHandler, TracingBasicMarkupAttoHandler, TracingDetailedHtmlAttoHandler, TracingDetailedMarkupAttoHandler, TracingStandardMarkupAttoHandler

public interface IProcessingInstructionHandling

Handler feature interface to be implemented by IAttoHandler implementations that offer reporting of Processing Instructions.

Since:
1.0
Author:
Daniel Fernández

Method Summary
 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.
 

Method Detail

handleProcessingInstruction

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

Called 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.

Parameters:
buffer - 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.
Throws:
AttoParseException


Copyright © 2012 The ATTOPARSER team. All Rights Reserved.