public class HtmlAttributeDesc extends Object
Modifier and Type | Field and Description |
---|---|
static int |
CONREF
Permitted values for _kind
|
static int |
CURRENT
Permitted values for _kind
|
static int |
IMPLIED
Permitted values for _kind
|
static int |
OTHER
Permitted values for _kind
|
static int |
REQUIRED
Permitted values for _kind
|
Constructor and Description |
---|
HtmlAttributeDesc(String name)
Constructor for an attribute that can take any value, with
kind defaulting to IMPLIED.
|
HtmlAttributeDesc(String name,
String[] permittedValues,
int kind)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getName()
Returns the attribute's name.
|
boolean |
isRequired()
Return
true if the attribute is required. |
boolean |
nameMatches(String name)
Returns
true if this tag's name
matches the parameter. |
boolean |
valueOK(String name,
String value)
Returns
true if the parameter is a permissible
value for the attribute. |
public static final int REQUIRED
public static final int CURRENT
public static final int CONREF
public static final int IMPLIED
public static final int OTHER
public HtmlAttributeDesc(String name, String[] permittedValues, int kind)
name
- The name of the attribute. Must be lower case.permittedValues
- Specific values allowed for the parameter. If
null, then any CDATA value is allowed.kind
- The kind of parameter. Must be REQUIRED, CURRENT,
CONREF, or IMPLIED.public HtmlAttributeDesc(String name)
public String getName()
public boolean nameMatches(String name)
true
if this tag's name
matches the parameter.public boolean valueOK(String name, String value)
true
if the parameter is a permissible
value for the attribute.public boolean isRequired()
true
if the attribute is required.Copyright © 2008–2017 The Open Preservation Foundation. All rights reserved.