org.attoparser.markup
Interface IDetailedDocTypeHandling

All Known Implementing Classes:
AbstractDetailedMarkupAttoHandler, AbstractStandardMarkupAttoHandler, DOMMarkupAttoHandler, DuplicatingDetailedMarkupAttoHandler, TracingDetailedMarkupAttoHandler, TracingStandardMarkupAttoHandler

public interface IDetailedDocTypeHandling

Handler feature interface to be implemented by IAttoHandler implementations that offer detailed reporting of DOCTYPE clauses.

Since:
1.0
Author:
Daniel Fernández

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

Method Detail

handleDocType

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

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

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


Copyright © 2012 The ATTOPARSER team. All Rights Reserved.