Package org.xwiki.validator
Class XWikiValidator
- java.lang.Object
-
- org.xwiki.validator.framework.AbstractXMLValidator
-
- org.xwiki.validator.framework.AbstractHTML5Validator
-
- org.xwiki.validator.XWikiValidator
-
- All Implemented Interfaces:
Validator
public class XWikiValidator extends AbstractHTML5Validator
Validator allowing to validate (X)HTML content against some XWiki rules.- Version:
- $Id: 7306174c808f970c9411950747d14062b2ed8e7b $
-
-
Field Summary
-
Fields inherited from class org.xwiki.validator.framework.AbstractHTML5Validator
ATTR_ACCESSKEY, ATTR_ALT, ATTR_BLUR, ATTR_CHANGE, ATTR_CHARSET, ATTR_CLICK, ATTR_CONTENT, ATTR_FOCUS, ATTR_HREF, ATTR_ID, ATTR_LOAD, ATTR_MOUSEOVER, ATTR_ROLE, ATTR_SCOPE, ATTR_SELECT, ATTR_SRC, ATTR_SUBMIT, ATTR_TITLE, ATTR_TYPE, ATTR_UNLOAD, BUTTON, ELEM_AREA, ELEM_BODY, ELEM_BOLD, ELEM_BR, ELEM_FIELDSET, ELEM_FORM, ELEM_FRAME, ELEM_FRAMESET, ELEM_H1, ELEM_HTML, ELEM_IFRAME, ELEM_IMG, ELEM_INPUT, ELEM_ITALIC, ELEM_LINK, ELEM_META, ELEM_SUBMIT, ELEM_TABLE, ELEM_TH, HIDDEN, html5Document, IMAGE, MAILTO, RESET, STYLE, SUBMIT
-
Fields inherited from class org.xwiki.validator.framework.AbstractXMLValidator
document, documentBuilder, errorHandler
-
-
Constructor Summary
Constructors Constructor Description XWikiValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
protected void
validate(Document document)
void
validateFailingMacros()
Check if there is any rendering error in the generated XHTML.void
validateNotEmptyHeadingId()
Check if there is any heading with empty (generally generated) id value.void
validateUrlOrResourcesWithoutDoubleInterrogationMark()
Ensure that no URL or resource link contains two "?".-
Methods inherited from class org.xwiki.validator.framework.AbstractHTML5Validator
assertFalse, assertTrue, containsElement, getAttributeNames, getAttributeValue, getAttributeValues, getChildren, getChildrenTagNames, getElement, getElements, getElements, getHTML5Document, hasAttribute, hasChildElement, setDocument, setHTML5Document, validate
-
Methods inherited from class org.xwiki.validator.framework.AbstractXMLValidator
addError, clear, createXMLErrorHandler, getDocument, getErrorHandler, getErrors, setValidateXML
-
-
-
-
Method Detail
-
validate
protected void validate(Document document)
- Overrides:
validate
in classAbstractXMLValidator
- Parameters:
document
- the XML document
-
validateFailingMacros
public void validateFailingMacros()
Check if there is any rendering error in the generated XHTML.
-
validateNotEmptyHeadingId
public void validateNotEmptyHeadingId()
Check if there is any heading with empty (generally generated) id value.
-
validateUrlOrResourcesWithoutDoubleInterrogationMark
public void validateUrlOrResourcesWithoutDoubleInterrogationMark()
Ensure that no URL or resource link contains two "?".
-
getName
public String getName()
- Returns:
- the name of the validator
-
-