Methods Summary |
---|
public void | anonymize()Make this element anonymous.
Remove any id or name attribute present
in the element's attributes.
for (int i = theAtts.getLength() - 1; i >= 0; i--) {
if (theAtts.getType(i).equals("ID") ||
theAtts.getQName(i).equals("name")) {
theAtts.removeAttribute(i);
}
}
|
public AttributesImpl | atts()Return the attributes as an AttributesImpl object.
Returning an AttributesImpl makes the attributes mutable. return theAtts;
|
public boolean | canContain(org.ccil.cowan.tagsoup.Element other)Return true if the type of this element can contain the type of
another element.
Convenience method.
return theType.canContain(other.theType);
|
public void | clean()Clean the attributes of this element.
Attributes with null name (the name was ill-formed)
or null value (the attribute was present in the element type but
not in this actual element) are removed.
for (int i = theAtts.getLength() - 1; i >= 0; i--) {
String name = theAtts.getLocalName(i);
if (theAtts.getValue(i) == null || name == null ||
name.length() == 0) {
theAtts.removeAttribute(i);
continue;
}
}
|
public int | flags()Return the flags vector of the element's type.
Convenience method. return theType.flags();
|
public boolean | isPreclosed()Return true if this element has been preclosed.
return preclosed;
|
public java.lang.String | localName()Return the local name of the element's type.
Convenience method. return theType.localName();
|
public int | memberOf()Return the member-of vector of the element's type.
Convenience method. return theType.memberOf();
|
public int | model()Return the content model vector of the element's type.
Convenience method. return theType.model();
|
public java.lang.String | name()Return the name of the element's type.
Convenience method. return theType.name();
|
public java.lang.String | namespace()Return the namespace name of the element's type.
Convenience method. return theType.namespace();
|
public org.ccil.cowan.tagsoup.Element | next()Return the next element in an element stack or queue. return theNext;
|
public ElementType | parent()Return the parent element type of the element's type.
Convenience method. return theType.parent();
|
public void | preclose()Force this element to preclosed status, meaning that an end-tag has
been seen but the element cannot yet be closed for structural reasons.
preclosed = true;
|
public void | setAttribute(java.lang.String name, java.lang.String type, java.lang.String value)Set an attribute and its value into this element.
theType.setAttribute(theAtts, name, type, value);
|
public void | setNext(org.ccil.cowan.tagsoup.Element next)Change the next element in an element stack or queue. theNext = next;
|
public ElementType | type()Return the element type. return theType;
|