Logo Search packages:      
Sourcecode: jericho-html version File versions  Download package

au::id::jericho::lib::html::StartTag Class Reference

Inheritance diagram for au::id::jericho::lib::html::StartTag:

au::id::jericho::lib::html::Tag au::id::jericho::lib::html::Segment au::id::jericho::lib::html::HTMLElementName

List of all members.


Detailed Description

Represents the start tag of an Element element} in a specific Source source} document.

A start tag always has a getTagType() type} that is a subclass of StartTagType, meaning that any tag that does not start with the characters '</' is categorised as a start tag.

This includes many tags which stand alone, without a StartTagType::getCorrespondingEndTagType() corresponding end tag}, and would not intuitively be categorised as a "start tag". For example, an HTML StartTagType::COMMENT comment} is represented as a single start tag that spans the whole comment, and does not have an end tag at all.

See the static fields defined in the StartTagType class for a list of the standard start tag types.

StartTag instances are obtained using one of the following methods:

The methods above which accept a name parameter are categorised as named search methods.

In such methods dealing with start tags, specifying an argument to the name parameter that ends in a colon (:) searches for all start tags in the specified XML namespace.

The constants defined in the HTMLElementName interface can be used directly as arguments to these name parameters. For example, source.findAllStartTags(HTMLElementName#A) is equivalent to source.findAllStartTags("a"), and finds all hyperlink start tags.

The Tag superclass defines a method called getName() to get the name of this start tag.

See also the XML 1.0 specification for start tags.

See also:
Tag

Element

EndTag

Definition at line 82 of file StartTag.java.


Public Member Functions

final char charAt (final int index)
int compareTo (final Object o)
final boolean encloses (final int pos)
final boolean encloses (final Segment segment)
final boolean equals (final Object object)
String extractText (final boolean includeAttributes)
String extractText ()
List findAllCharacterReferences ()
List findAllComments ()
List findAllElements (final StartTagType startTagType)
List findAllElements (String name)
List findAllElements ()
List findAllStartTags (final String attributeName, final String value, final boolean valueCaseSensitive)
List findAllStartTags (String name)
List findAllStartTags ()
List findAllTags (final TagType tagType)
List findAllTags ()
EndTag findEndTag ()
List findFormControls ()
FormFields findFormFields ()
Tag findNextTag ()
Tag findPreviousTag ()
final List findWords ()
Attributes getAttributes ()
String getAttributeValue (final String attributeName)
final int getBegin ()
List getChildElements ()
String getDebugInfo ()
Element getElement ()
final int getEnd ()
Segment getFollowingTextSegment ()
FormControl getFormControl ()
FormControlType getFormControlType ()
final String getName ()
Segment getNameSegment ()
String getSourceText ()
final String getSourceTextNoWhitespace ()
StartTagType getStartTagType ()
Segment getTagContent ()
TagType getTagType ()
Object getUserData ()
int hashCode ()
void ignoreWhenParsing ()
boolean isComment ()
boolean isCommonServerTag ()
boolean isDocTypeDeclaration ()
boolean isEmptyElementTag ()
boolean isEndTagForbidden ()
boolean isEndTagOptional ()
boolean isEndTagRequired ()
boolean isMasonComponentCall ()
boolean isMasonComponentCalledWithContent ()
boolean isMasonNamedBlock ()
boolean isMasonTag ()
boolean isPHPTag ()
boolean isProcessingInstruction ()
boolean isServerTag ()
boolean isUnregistered ()
final boolean isWhiteSpace ()
boolean isXMLDeclaration ()
final int length ()
Attributes parseAttributes (final int maxErrorCount)
Attributes parseAttributes ()
String regenerateHTML ()
void setUserData (final Object userData)
final CharSequence subSequence (final int beginIndex, final int endIndex)
String tidy (boolean toXHTML)
String tidy ()
String toString ()

Static Public Member Functions

static String generateHTML (final String tagName, final Map attributesMap, final boolean emptyElementTag)
static final boolean isWhiteSpace (final char ch)
static final boolean isXMLName (final CharSequence text)
static final boolean isXMLNameChar (final char ch)
static final boolean isXMLNameStartChar (final char ch)

Static Public Attributes

static final String A = "a"
static final String ABBR = "abbr"
static final String ACRONYM = "acronym"
static final String ADDRESS = "address"
static final String APPLET = "applet"
static final String AREA = "area"
static final String B = "b"
static final String BASE = "base"
static final String BASEFONT = "basefont"
static final String BDO = "bdo"
static final String BIG = "big"
static final String BLOCKQUOTE = "blockquote"
static final String BODY = "body"
static final String BR = "br"
static final String BUTTON = "button"
static final String CAPTION = "caption"
static final String CENTER = "center"
static final String CITE = "cite"
static final String CODE = "code"
static final String COL = "col"
static final String COLGROUP = "colgroup"
static final String DD = "dd"
static final String DEL = "del"
static final String DFN = "dfn"
static final String DIR = "dir"
static final String DIV = "div"
static final String DL = "dl"
static final String DOCTYPE_DECLARATION = StartTagType.DOCTYPE_DECLARATION.getNamePrefixForTagConstant()
static final String DT = "dt"
static final String EM = "em"
static final String FIELDSET = "fieldset"
static final String FONT = "font"
static final String FORM = "form"
static final String FRAME = "frame"
static final String FRAMESET = "frameset"
static final String H1 = "h1"
static final String H2 = "h2"
static final String H3 = "h3"
static final String H4 = "h4"
static final String H5 = "h5"
static final String H6 = "h6"
static final String HEAD = "head"
static final String HR = "hr"
static final String HTML = "html"
static final String I = "i"
static final String IFRAME = "iframe"
static final String IMG = "img"
static final String INPUT = "input"
static final String INS = "ins"
static final String ISINDEX = "isindex"
static final String KBD = "kbd"
static final String LABEL = "label"
static final String LEGEND = "legend"
static final String LI = "li"
static final String LINK = "link"
static final String MAP = "map"
static final String MENU = "menu"
static final String META = "meta"
static final String NOFRAMES = "noframes"
static final String NOSCRIPT = "noscript"
static final String OBJECT = "object"
static final String OL = "ol"
static final String OPTGROUP = "optgroup"
static final String OPTION = "option"
static final String P = "p"
static final String PARAM = "param"
static final String PRE = "pre"
static final String PROCESSING_INSTRUCTION = StartTagType.XML_PROCESSING_INSTRUCTION.getNamePrefixForTagConstant()
static final String Q = "q"
static final String S = "s"
static final String SAMP = "samp"
static final String SCRIPT = "script"
static final String SELECT = "select"
static final String SERVER_COMMON = StartTagType.SERVER_COMMON.getNamePrefixForTagConstant()
static final String SERVER_MASON_COMPONENT_CALL = MasonTagTypes.MASON_COMPONENT_CALL.getNamePrefixForTagConstant()
static final String SERVER_MASON_COMPONENT_CALLED_WITH_CONTENT = MasonTagTypes.MASON_COMPONENT_CALLED_WITH_CONTENT.getNamePrefixForTagConstant()
static final String SERVER_MASON_NAMED_BLOCK = MasonTagTypes.MASON_NAMED_BLOCK.getNamePrefixForTagConstant()
static final String SERVER_PHP = PHPTagTypes.PHP_STANDARD.getNamePrefixForTagConstant()
static final String SMALL = "small"
static final String SPAN = "span"
static final String STRIKE = "strike"
static final String STRONG = "strong"
static final String STYLE = "style"
static final String SUB = "sub"
static final String SUP = "sup"
static final String TABLE = "table"
static final String TBODY = "tbody"
static final String TD = "td"
static final String TEXTAREA = "textarea"
static final String TFOOT = "tfoot"
static final String TH = "th"
static final String THEAD = "thead"
static final String TITLE = "title"
static final String TR = "tr"
static final String TT = "tt"
static final String U = "u"
static final String UL = "ul"
static final String VAR = "var"
static final String XML_DECLARATION = StartTagType.XML_DECLARATION.getNamePrefixForTagConstant()

Package Functions

StringBuffer appendStartTagDebugInfo (final StringBuffer sb)
final boolean includeInSearch ()
 StartTag (final Source source, final int begin, final int end, final StartTagType startTagType, final String name, final Attributes attributes)

Static Package Functions

static final StringBuffer appendCollapseWhiteSpace (final StringBuffer sb, final CharSequence text)
static StartTag findNext (final Source source, int pos, final String attributeName, final String value, final boolean valueCaseSensitive)
static StartTag findPreviousOrNext (final Source source, int pos, final boolean previous)
static StartTag findPreviousOrNext (final Source source, final int pos, final String searchName, final boolean isXMLTagName, final boolean previous)
static final Tag findPreviousOrNextTag (final Source source, final int pos, final TagType tagType, final boolean previous)
static final Tag findPreviousOrNextTag (final Source source, final int pos, final boolean previous)
static final Tag findPreviousOrNextTagUncached (final Source source, final int pos, final TagType tagType, final boolean previous, final int breakAtPos)
static final Tag findPreviousOrNextTagUncached (final Source source, final int pos, final boolean previous, final int breakAtPos)
static Iterator getNextTagIterator (final Source source, final int pos)
static final Tag getTagAt (final Source source, final int pos)
static final Tag getTagAtUncached (final Source source, final int pos)
static final Tag[] parseAll (final Source source, final boolean assumeNoNestedTags)

Package Attributes

int allTagsArrayIndex = -1
final int begin
List childElements = null
Element element = Element.NOT_CACHED
final int end
String name = null
final Source source
final StartTagType startTagType

Private Member Functions

Segment[] findEndTag (final int afterPos, StartTag nextStartTag, EndTag nextEndTag, final boolean checkForEmptyElementTag)
Segment[] findEndTag (final EndTag nextEndTag, final boolean checkForEmptyElementTag)
EndTag findEndTagInternal ()
EndTag findOptionalEndTag (final HTMLElementTerminatingTagNameSets terminatingTagNameSets)

Private Attributes

final Attributes attributes

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index