Package nu.validator.htmlparser.impl
Class HtmlAttributes
java.lang.Object
nu.validator.htmlparser.impl.HtmlAttributes
- All Implemented Interfaces:
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 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final AttributeName[]
static final HtmlAttributes
private static final String[]
private String
private int
private int
private AttributeName[]
private String[]
private int
private AttributeName[]
private String[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
addAttribute
(AttributeName name, String value, XmlViolationPolicy xmlnsPolicy) void
void
(package private) void
clear
(int m) (package private) void
This is only used forAttributeName
ownership transfer in the isindex case to avoid freeing custom names twice in C++.cloneAttributes
(Interner interner) (package private) boolean
contains
(AttributeName name) (package private) void
boolean
equalsAnother
(HtmlAttributes other) getAttributeName
(int index) getId()
int
int
int
getIndex
(AttributeName name) Only use with a static argumentint
getLocalName
(int index) getPrefix
(int index) getQName
(int index) getType
(int index) getURI
(int index) getValue
(int index) getValue
(AttributeName name) Only use with static argument.getXmlnsAttributeName
(int index) int
getXmlnsIndex
(AttributeName name) int
getXmlnsLocalName
(int index) getXmlnsURI
(int index) getXmlnsValue
(int index) getXmlnsValue
(AttributeName name) void
merge
(HtmlAttributes attributes) (package private) void
processNonNcNames
(TreeBuilder<?> treeBuilder, XmlViolationPolicy namePolicy) (package private) void
releaseValue
(int i) This is used in C++ to release specialisindex
attribute values whose ownership is not transferred.
-
Field Details
-
EMPTY_ATTRIBUTENAMES
-
EMPTY_STRINGS
-
EMPTY_ATTRIBUTES
-
mode
private int mode -
length
private int length -
names
-
values
-
idValue
-
xmlnsLength
private int xmlnsLength -
xmlnsNames
-
xmlnsValues
-
-
Constructor Details
-
HtmlAttributes
public HtmlAttributes(int mode)
-
-
Method Details
-
destructor
void destructor() -
getIndex
Only use with a static argument- Parameters:
name
-- Returns:
-
getIndex
- Specified by:
getIndex
in interfaceAttributes
-
getIndex
- Specified by:
getIndex
in interfaceAttributes
-
getType
- Specified by:
getType
in interfaceAttributes
-
getType
- Specified by:
getType
in interfaceAttributes
-
getValue
- Specified by:
getValue
in interfaceAttributes
-
getValue
- Specified by:
getValue
in interfaceAttributes
-
getLength
public int getLength()- Specified by:
getLength
in interfaceAttributes
-
getLocalName
- Specified by:
getLocalName
in interfaceAttributes
-
getQName
- Specified by:
getQName
in interfaceAttributes
-
getType
- Specified by:
getType
in interfaceAttributes
-
getAttributeName
-
getURI
- Specified by:
getURI
in interfaceAttributes
-
getPrefix
-
getValue
- Specified by:
getValue
in interfaceAttributes
-
getValue
Only use with static argument.- See Also:
-
getId
-
getXmlnsLength
public int getXmlnsLength() -
getXmlnsLocalName
-
getXmlnsURI
-
getXmlnsValue
-
getXmlnsIndex
-
getXmlnsValue
-
getXmlnsAttributeName
-
addAttribute
void addAttribute(AttributeName name, String value, XmlViolationPolicy xmlnsPolicy) throws SAXException - Throws:
SAXException
-
clear
void clear(int m) -
releaseValue
void releaseValue(int i) This is used in C++ to release specialisindex
attribute values whose ownership is not transferred. -
clearWithoutReleasingContents
void clearWithoutReleasingContents()This is only used forAttributeName
ownership transfer in the isindex case to avoid freeing custom names twice in C++. -
contains
-
adjustForMath
public void adjustForMath() -
adjustForSvg
public void adjustForSvg() -
cloneAttributes
- Throws:
SAXException
-
equalsAnother
-
processNonNcNames
void processNonNcNames(TreeBuilder<?> treeBuilder, XmlViolationPolicy namePolicy) throws SAXException - Throws:
SAXException
-
merge
- Throws:
SAXException
-