public class WAIValidator extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,String> |
linkToDest |
| Constructor and Description |
|---|
WAIValidator(Locale uiLocale) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
countHeadersInRow(net.htmlparser.jericho.Element rowElement) |
protected int |
countHeadersInRows(List<net.htmlparser.jericho.Element> rowElements) |
protected void |
processFrameset(net.htmlparser.jericho.Element node,
Set<String> noframes,
List<Result> errors,
int level,
net.htmlparser.jericho.Source source)
Validates a Frame Element.
|
protected void |
processTable(net.htmlparser.jericho.Element node,
Set<String> headers,
Set<String> ids,
List<Result> errors,
int level,
net.htmlparser.jericho.Source source)
Recursive method to process a Table element and all its children
|
protected void |
resetIsDataTable(int level)
If the level given in parameter is equal to the formLevel which previously set the isDataTable to false, then we have finished
processing the form and we can set the variable back to true.
|
protected void |
setIsDataTable(int level)
Sets the isDataTable boolean to false and stores the level of the Node which invoked this method.
|
String |
toString() |
ValidatorResults |
validate(String inputHTML)
Validates a HTML fragment represented as a String.
|
protected Result |
validateAreaShape(net.htmlparser.jericho.Element node,
net.htmlparser.jericho.Source source)
Validates an Area Element.
|
protected List<Result> |
validateForm(net.htmlparser.jericho.Element node,
int level,
net.htmlparser.jericho.Source source)
Validates a Form Element.
|
protected List<Result> |
validateFrameset(net.htmlparser.jericho.Element node,
int level,
net.htmlparser.jericho.Source source) |
protected List<Result> |
validateHtml(net.htmlparser.jericho.Element node,
net.htmlparser.jericho.Source source)
Validates an HTML fragment starting from any Node.
|
protected Result |
validateImage(net.htmlparser.jericho.Element node,
net.htmlparser.jericho.Source source)
Validates an Img Element.
|
protected Result |
validateLink(net.htmlparser.jericho.Element node,
net.htmlparser.jericho.Source source)
Validates a link Element.
|
protected List<Result> |
validateTable(net.htmlparser.jericho.Element node,
int level,
net.htmlparser.jericho.Source source)
Validates a Table Element.
|
public WAIValidator(Locale uiLocale)
public ValidatorResults validate(String inputHTML)
inputHTML - The html fragmentprotected List<Result> validateHtml(net.htmlparser.jericho.Element node, net.htmlparser.jericho.Source source)
node - The starting Node.source - protected void setIsDataTable(int level)
level - The level of the Form tag being processed.protected void resetIsDataTable(int level)
level - The level of the tag being processed.protected Result validateLink(net.htmlparser.jericho.Element node, net.htmlparser.jericho.Source source) throws DOMException
node - The HTMLAnchorElement.source - DOMExceptionprotected Result validateImage(net.htmlparser.jericho.Element node, net.htmlparser.jericho.Source source)
node - The HTMLImageElement.source - protected Result validateAreaShape(net.htmlparser.jericho.Element node, net.htmlparser.jericho.Source source)
node - The HTMLAreaElement.source - protected List<Result> validateTable(net.htmlparser.jericho.Element node, int level, net.htmlparser.jericho.Source source)
node - The HTMLFormElement.source - protected void processTable(net.htmlparser.jericho.Element node,
Set<String> headers,
Set<String> ids,
List<Result> errors,
int level,
net.htmlparser.jericho.Source source)
node - The current node of the Table.headers - The current list of 'headers' attributes (present in tds)errors - source - protected int countHeadersInRows(List<net.htmlparser.jericho.Element> rowElements)
protected int countHeadersInRow(net.htmlparser.jericho.Element rowElement)
protected List<Result> validateForm(net.htmlparser.jericho.Element node, int level, net.htmlparser.jericho.Source source)
node - The HTMLFormElement.level - The level of the root form node in relation to the top root node of the html fragment.source - protected List<Result> validateFrameset(net.htmlparser.jericho.Element node, int level, net.htmlparser.jericho.Source source)
protected void processFrameset(net.htmlparser.jericho.Element node,
Set<String> noframes,
List<Result> errors,
int level,
net.htmlparser.jericho.Source source)
node - The HTMLFrameElement.source - Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.