Package nu.validator.htmlparser.impl
Class HtmlAttributes
- java.lang.Object
-
- nu.validator.htmlparser.impl.HtmlAttributes
-
- All Implemented Interfaces:
org.xml.sax.Attributes
public final class HtmlAttributes extends java.lang.Object implements org.xml.sax.AttributesBe careful with this class. QName is the name in from HTML tokenization. Otherwise, please refer to the interface doc.- Version:
- $Id: AttributesImpl.java 206 2008-03-20 14:09:29Z hsivonen $
- Author:
- hsivonen
-
-
Field Summary
Fields Modifier and Type Field Description static HtmlAttributesEMPTY_ATTRIBUTES
-
Constructor Summary
Constructors Constructor Description HtmlAttributes(int mode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadjustForMath()voidadjustForSvg()HtmlAttributescloneAttributes()booleanequalsAnother(HtmlAttributes other)AttributeNamegetAttributeName(int index)AttributeNamegetAttributeNameNoBoundsCheck(int index)Variant ofgetAttributeName(int index)without bounds check.java.lang.StringgetId()intgetIndex(java.lang.String qName)intgetIndex(java.lang.String uri, java.lang.String localName)intgetIndex(AttributeName name)Only use with a static argumentintgetLength()java.lang.StringgetLocalName(int index)java.lang.StringgetLocalNameNoBoundsCheck(int index)Variant ofgetLocalName(int index)without bounds check.java.lang.StringgetPrefix(int index)java.lang.StringgetPrefixNoBoundsCheck(int index)Variant ofgetPrefix(int index)without bounds check.java.lang.StringgetQName(int index)java.lang.StringgetQNameNoBoundsCheck(int index)Variant ofgetQName(int index)without bounds check.java.lang.StringgetType(int index)java.lang.StringgetType(java.lang.String qName)java.lang.StringgetType(java.lang.String uri, java.lang.String localName)java.lang.StringgetTypeNoBoundsCheck(int index)Variant ofgetType(int index)without bounds check.java.lang.StringgetURI(int index)java.lang.StringgetURINoBoundsCheck(int index)Variant ofgetURI(int index)without bounds check.java.lang.StringgetValue(int index)java.lang.StringgetValue(java.lang.String qName)java.lang.StringgetValue(java.lang.String uri, java.lang.String localName)java.lang.StringgetValue(AttributeName name)Only use with static argument.java.lang.StringgetValueNoBoundsCheck(int index)Variant ofgetValue(int index)without bounds check.AttributeNamegetXmlnsAttributeName(int index)intgetXmlnsIndex(AttributeName name)intgetXmlnsLength()java.lang.StringgetXmlnsLocalName(int index)java.lang.StringgetXmlnsURI(int index)java.lang.StringgetXmlnsValue(int index)java.lang.StringgetXmlnsValue(AttributeName name)voidmerge(HtmlAttributes attributes)
-
-
-
Field Detail
-
EMPTY_ATTRIBUTES
public static final HtmlAttributes EMPTY_ATTRIBUTES
-
-
Method Detail
-
getIndex
public int getIndex(AttributeName name)
Only use with a static argument- Parameters:
name-- Returns:
-
getValue
public java.lang.String getValue(AttributeName name)
Only use with static argument.- See Also:
Attributes.getValue(java.lang.String)
-
getLength
public int getLength()
- Specified by:
getLengthin interfaceorg.xml.sax.Attributes
-
getLocalNameNoBoundsCheck
public java.lang.String getLocalNameNoBoundsCheck(int index)
Variant ofgetLocalName(int index)without bounds check.- Parameters:
index- a valid attribute index- Returns:
- the local name at index
-
getURINoBoundsCheck
public java.lang.String getURINoBoundsCheck(int index)
Variant ofgetURI(int index)without bounds check.- Parameters:
index- a valid attribute index- Returns:
- the namespace URI at index
-
getPrefixNoBoundsCheck
public java.lang.String getPrefixNoBoundsCheck(int index)
Variant ofgetPrefix(int index)without bounds check.- Parameters:
index- a valid attribute index- Returns:
- the namespace prefix at index
-
getValueNoBoundsCheck
public java.lang.String getValueNoBoundsCheck(int index)
Variant ofgetValue(int index)without bounds check.- Parameters:
index- a valid attribute index- Returns:
- the attribute value at index
-
getAttributeNameNoBoundsCheck
public AttributeName getAttributeNameNoBoundsCheck(int index)
Variant ofgetAttributeName(int index)without bounds check.- Parameters:
index- a valid attribute index- Returns:
- the attribute name at index
-
getQNameNoBoundsCheck
public java.lang.String getQNameNoBoundsCheck(int index)
Variant ofgetQName(int index)without bounds check.- Parameters:
index- a valid attribute index- Returns:
- the QName at index
-
getTypeNoBoundsCheck
public java.lang.String getTypeNoBoundsCheck(int index)
Variant ofgetType(int index)without bounds check.- Parameters:
index- a valid attribute index- Returns:
- the attribute type at index
-
getIndex
public int getIndex(java.lang.String qName)
- Specified by:
getIndexin interfaceorg.xml.sax.Attributes
-
getIndex
public int getIndex(java.lang.String uri, java.lang.String localName)- Specified by:
getIndexin interfaceorg.xml.sax.Attributes
-
getType
public java.lang.String getType(java.lang.String qName)
- Specified by:
getTypein interfaceorg.xml.sax.Attributes
-
getType
public java.lang.String getType(java.lang.String uri, java.lang.String localName)- Specified by:
getTypein interfaceorg.xml.sax.Attributes
-
getValue
public java.lang.String getValue(java.lang.String qName)
- Specified by:
getValuein interfaceorg.xml.sax.Attributes
-
getValue
public java.lang.String getValue(java.lang.String uri, java.lang.String localName)- Specified by:
getValuein interfaceorg.xml.sax.Attributes
-
getLocalName
public java.lang.String getLocalName(int index)
- Specified by:
getLocalNamein interfaceorg.xml.sax.Attributes
-
getQName
public java.lang.String getQName(int index)
- Specified by:
getQNamein interfaceorg.xml.sax.Attributes
-
getType
public java.lang.String getType(int index)
- Specified by:
getTypein interfaceorg.xml.sax.Attributes
-
getAttributeName
public AttributeName getAttributeName(int index)
-
getURI
public java.lang.String getURI(int index)
- Specified by:
getURIin interfaceorg.xml.sax.Attributes
-
getPrefix
public java.lang.String getPrefix(int index)
-
getValue
public java.lang.String getValue(int index)
- Specified by:
getValuein interfaceorg.xml.sax.Attributes
-
getId
public java.lang.String getId()
-
getXmlnsLength
public int getXmlnsLength()
-
getXmlnsLocalName
public java.lang.String getXmlnsLocalName(int index)
-
getXmlnsURI
public java.lang.String getXmlnsURI(int index)
-
getXmlnsValue
public java.lang.String getXmlnsValue(int index)
-
getXmlnsIndex
public int getXmlnsIndex(AttributeName name)
-
getXmlnsValue
public java.lang.String getXmlnsValue(AttributeName name)
-
getXmlnsAttributeName
public AttributeName getXmlnsAttributeName(int index)
-
adjustForMath
public void adjustForMath()
-
adjustForSvg
public void adjustForSvg()
-
cloneAttributes
public HtmlAttributes cloneAttributes() throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
-
equalsAnother
public boolean equalsAnother(HtmlAttributes other)
-
merge
public void merge(HtmlAttributes attributes) throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
-
-