org.attoparser.markup
Interface IXmlDeclarationHandling

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

public interface IXmlDeclarationHandling

Handler feature interface to be implemented by IAttoHandler implementations that offer reporting of XML Declarations.

Since:
1.0
Author:
Daniel Fernández

Method Summary
 void handleXmlDeclaration(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.
 

Method Detail

handleXmlDeclaration

void handleXmlDeclaration(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

Called when a XML Declaration is found.

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.

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


Copyright © 2012 The ATTOPARSER team. All Rights Reserved.