public abstract class HtmlDocDesc
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected HtmlTagDesc |
bodyElement
A representation of the BODY element.
|
protected static java.util.HashMap |
commonTags
Generic list of supported tags.
|
protected HtmlTagDesc |
framesetElement
A representation of the FRAMESET element.
|
protected HtmlTagDesc |
headElement
A representation of the HEAD element.
|
protected static java.lang.String[] |
headings
Header tags, which are invariant for all HTML versions.
|
protected HtmlTagDesc |
htmlElement
A representation of the HTML element.
|
protected java.util.Map |
supportedElements
List of supported tags for this version of HTML.
|
Constructor and Description |
---|
HtmlDocDesc()
Consructor.
|
Modifier and Type | Method and Description |
---|---|
protected static void |
addRequiredAttribute(java.util.List atts,
java.lang.String name)
Adds an attribute to a List, with unrestricted values and
type REQUIRED.
|
protected static void |
addSelfAttribute(java.util.List atts,
java.lang.String name)
Adds an attribute to a List, with the only permitted value being
the name of the attribute.
|
protected static void |
addSimpleAttribute(java.util.List atts,
java.lang.String name)
Adds an attribute to a List, with unrestricted values and
type IMPLIED.
|
protected static void |
addStringsToList(java.lang.String[] names,
java.util.List lst)
Adds all the Strings in an array to the end of a List.
|
HtmlMetadata |
getMetadata()
Returns the metadata for this document.
|
protected void |
init()
Initialization called by subclass constructors after supportedElements
has been assigned.
|
protected void |
pushElementStack(JHOpenTag tag)
Pushes an element onto the element stack.
|
protected static void |
removeStringsFromList(java.util.List lst,
java.lang.String[] strs)
Removes excluded strings from a List.
|
boolean |
validate(java.util.List elements,
RepInfo info)
Validates the document and puts interesting properties into the
RepInfo.
|
protected static java.util.HashMap commonTags
protected java.util.Map supportedElements
protected HtmlTagDesc htmlElement
protected HtmlTagDesc headElement
protected HtmlTagDesc bodyElement
protected HtmlTagDesc framesetElement
protected static java.lang.String[] headings
public boolean validate(java.util.List elements, RepInfo info)
elements
- The element list constructed by the parserinfo
- The RepInfo object which will be populated
with propertiespublic HtmlMetadata getMetadata()
protected void init()
protected static void addStringsToList(java.lang.String[] names, java.util.List lst)
protected static void addSimpleAttribute(java.util.List atts, java.lang.String name)
protected static void addRequiredAttribute(java.util.List atts, java.lang.String name)
protected static void addSelfAttribute(java.util.List atts, java.lang.String name)
protected static void removeStringsFromList(java.util.List lst, java.lang.String[] strs)
protected void pushElementStack(JHOpenTag tag)