Class HtmlAttributes

java.lang.Object
nu.validator.htmlparser.impl.HtmlAttributes
All Implemented Interfaces:
Attributes

public final class HtmlAttributes extends Object implements Attributes
Be 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 Details

    • EMPTY_ATTRIBUTES

      public static final HtmlAttributes EMPTY_ATTRIBUTES
  • Constructor Details

    • HtmlAttributes

      public HtmlAttributes(int mode)
  • Method Details

    • getIndex

      public int getIndex(AttributeName name)
      Only use with a static argument
      Parameters:
      name -
      Returns:
    • getValue

      public String getValue(AttributeName name)
      Only use with static argument.
      See Also:
    • getLength

      public int getLength()
      Specified by:
      getLength in interface Attributes
    • getLocalNameNoBoundsCheck

      public String getLocalNameNoBoundsCheck(int index)
      Variant of getLocalName(int index) without bounds check.
      Parameters:
      index - a valid attribute index
      Returns:
      the local name at index
    • getURINoBoundsCheck

      public String getURINoBoundsCheck(int index)
      Variant of getURI(int index) without bounds check.
      Parameters:
      index - a valid attribute index
      Returns:
      the namespace URI at index
    • getPrefixNoBoundsCheck

      public String getPrefixNoBoundsCheck(int index)
      Variant of getPrefix(int index) without bounds check.
      Parameters:
      index - a valid attribute index
      Returns:
      the namespace prefix at index
    • getValueNoBoundsCheck

      public String getValueNoBoundsCheck(int index)
      Variant of getValue(int index) without bounds check.
      Parameters:
      index - a valid attribute index
      Returns:
      the attribute value at index
    • getAttributeNameNoBoundsCheck

      public AttributeName getAttributeNameNoBoundsCheck(int index)
      Variant of getAttributeName(int index) without bounds check.
      Parameters:
      index - a valid attribute index
      Returns:
      the attribute name at index
    • getQNameNoBoundsCheck

      public String getQNameNoBoundsCheck(int index)
      Variant of getQName(int index) without bounds check.
      Parameters:
      index - a valid attribute index
      Returns:
      the QName at index
    • getTypeNoBoundsCheck

      public String getTypeNoBoundsCheck(int index)
      Variant of getType(int index) without bounds check.
      Parameters:
      index - a valid attribute index
      Returns:
      the attribute type at index
    • getIndex

      public int getIndex(String qName)
      Specified by:
      getIndex in interface Attributes
    • getIndex

      public int getIndex(String uri, String localName)
      Specified by:
      getIndex in interface Attributes
    • getType

      public String getType(String qName)
      Specified by:
      getType in interface Attributes
    • getType

      public String getType(String uri, String localName)
      Specified by:
      getType in interface Attributes
    • getValue

      public String getValue(String qName)
      Specified by:
      getValue in interface Attributes
    • getValue

      public String getValue(String uri, String localName)
      Specified by:
      getValue in interface Attributes
    • getLocalName

      public String getLocalName(int index)
      Specified by:
      getLocalName in interface Attributes
    • getQName

      public String getQName(int index)
      Specified by:
      getQName in interface Attributes
    • getType

      public String getType(int index)
      Specified by:
      getType in interface Attributes
    • getAttributeName

      public AttributeName getAttributeName(int index)
    • getURI

      public String getURI(int index)
      Specified by:
      getURI in interface Attributes
    • getPrefix

      public String getPrefix(int index)
    • getValue

      public String getValue(int index)
      Specified by:
      getValue in interface Attributes
    • getId

      public String getId()
    • getXmlnsLength

      public int getXmlnsLength()
    • getXmlnsLocalName

      public String getXmlnsLocalName(int index)
    • getXmlnsURI

      public String getXmlnsURI(int index)
    • getXmlnsValue

      public String getXmlnsValue(int index)
    • getXmlnsIndex

      public int getXmlnsIndex(AttributeName name)
    • getXmlnsValue

      public String getXmlnsValue(AttributeName name)
    • getXmlnsAttributeName

      public AttributeName getXmlnsAttributeName(int index)
    • adjustForMath

      public void adjustForMath()
    • adjustForSvg

      public void adjustForSvg()
    • cloneAttributes

      public HtmlAttributes cloneAttributes() throws SAXException
      Throws:
      SAXException
    • equalsAnother

      public boolean equalsAnother(HtmlAttributes other)
    • merge

      public void merge(HtmlAttributes attributes) throws SAXException
      Throws:
      SAXException