IMarkupHandler
AbstractChainedMarkupHandler
, AbstractMarkupHandler
, AttributeSelectionMarkingMarkupHandler
, BlockSelectorMarkupHandler
, DiscardMarkupHandler
, DOMBuilderMarkupHandler
, DuplicateMarkupHandler
, MinimizeHtmlMarkupHandler
, NodeSelectorMarkupHandler
, OutputMarkupHandler
, PrettyHtmlMarkupHandler
, SimplifierMarkupHandler
, TextOutputMarkupHandler
, TraceBuilderMarkupHandler
public interface IDocTypeHandler
Interface to be implemented by all handlers capable of receiving events about DOCTYPE clauses.
Events in this interface are a part of the IMarkupHandler
interface, the main handling interface in
AttoParser.
IMarkupHandler
Modifier and Type | Method | Description |
---|---|---|
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 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 ParseException
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.
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.ParseException
- if any exceptions occur during handling.Copyright © 2018 The ATTOPARSER team. All rights reserved.