public class JHOpenTag extends JHElement
Modifier and Type | Field and Description |
---|---|
List |
_attributes
List of element attributes.
|
String |
_name
Element name.
|
Constructor and Description |
---|
JHOpenTag(List elements,
String name,
List attrs,
int line,
int column)
Constructor.
|
JHOpenTag(List elements,
String name,
List attrs,
int line,
int column,
String message)
Constructor with error message.
|
JHOpenTag(String name)
Constructor for a stub attribute.
|
Modifier and Type | Method and Description |
---|---|
protected void |
advanceIndex()
Increments the value of _contentIdx
|
protected boolean |
allowsTag(String tag,
HtmlDocDesc doc)
Returns
true if the tag given in the parameter is
allowable in our context. |
protected boolean |
canAdvance()
Reports whether it's legal to advance to the next content
index.
|
protected boolean |
canGetMore()
Checks if we can accept another element at the current
content index.
|
protected void |
countComponent()
Counts off a component at the current index.
|
List |
getAttributes()
Returns the tag's attributes.
|
HtmlTagDesc |
getElement()
Returns the element definition which has been associated with
this tag.
|
protected String |
getErrorMessage()
Returns the error message associated with this element.
|
String |
getName()
Returns the tag's name.
|
protected void |
processElement(HtmlMetadata mdata)
Process the element to extract any available metadata.
|
void |
setElement(HtmlTagDesc element)
Associates an the tag with an element definition.
|
getColumn, getEntities, getLine
public String _name
public List _attributes
public JHOpenTag(List elements, String name, List attrs, int line, int column)
elements
- The list of parsed elements, to which
this gets added. May be null for a stub
element not generated by the parser.name
- The name of the tagattrs
- A List of attributes, representing
the parsed attributes of the tag. Each
attributes is an array of two strings, the
name and the value. If no explicit value
was given, attribute[1] is null. If the
attribute was in quotes, the quotes are still there.line
- Line number, for information reportingcolumn
- Line number, for information reportingpublic JHOpenTag(List elements, String name, List attrs, int line, int column, String message)
elements
- The list of parsed elements, to which
this gets added. May be null for a stub
element not generated by the parser.name
- The name of the tagattrs
- A List of attributes, representing
the parsed attributes of the tag. Each
attributes is an array of two strings, the
name and the value. If no explicit value
was given, attribute[1] is null. If the
attribute was in quotes, the quotes are still there.message
- An error message indicating that this element
isn't well-formed, but we'll take it anyway.public JHOpenTag(String name)
public void setElement(HtmlTagDesc element)
public HtmlTagDesc getElement()
public String getName()
public List getAttributes()
protected void processElement(HtmlMetadata mdata)
protected boolean allowsTag(String tag, HtmlDocDesc doc)
true
if the tag given in the parameter is
allowable in our context.protected boolean canGetMore()
protected void countComponent()
protected void advanceIndex()
protected boolean canAdvance()
protected String getErrorMessage()
Copyright © 2008–2017 The Open Preservation Foundation. All rights reserved.