|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.jelly.TagSupport
org.apache.commons.jelly.tags.validate.ValidateTag
This tag validates its body using a schema Verifier which can validate against DTDs, XML Schema, RelaxNG, Relax or TREX. Any JARV compliant Verifier could be used. The error messages are output as XML events so that they can be styled by the parent tag.
Field Summary | |
private org.xml.sax.ErrorHandler |
errorHandler
The SAX ErrorHandler |
private java.lang.String |
var
The boolean flag for whether the XML is valid |
private org.iso_relax.verifier.Verifier |
verifier
The verifier that this tag will use |
Fields inherited from class org.apache.commons.jelly.TagSupport |
body, context, hasTrimmed, parent, shouldTrim |
Constructor Summary | |
ValidateTag()
|
Method Summary | |
void |
doTag(org.apache.commons.jelly.XMLOutput output)
|
org.xml.sax.ErrorHandler |
getErrorHandler()
|
protected void |
handleValid(boolean valid)
Processes whether or not the document is valid. |
protected void |
outputException(org.apache.commons.jelly.XMLOutput output,
java.lang.String name,
org.xml.sax.SAXParseException e)
Outputs the given validation exception as XML to the output |
void |
setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
Sets the SAX ErrorHandler which is used to capture XML validation events. |
void |
setVar(java.lang.String var)
Sets the name of the variable that will contain a boolean flag for whether or not the XML is valid. |
void |
setVerifier(org.iso_relax.verifier.Verifier verifier)
Sets the schema Verifier that this tag will use to verify its body |
Methods inherited from class org.apache.commons.jelly.TagSupport |
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isTrim, setBody, setContext, setParent, setTrim, trimBody |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private org.iso_relax.verifier.Verifier verifier
private org.xml.sax.ErrorHandler errorHandler
private java.lang.String var
Constructor Detail |
public ValidateTag()
Method Detail |
public void doTag(org.apache.commons.jelly.XMLOutput output) throws org.apache.commons.jelly.MissingAttributeException, org.apache.commons.jelly.JellyTagException
org.apache.commons.jelly.MissingAttributeException
org.apache.commons.jelly.JellyTagException
public void setVerifier(org.iso_relax.verifier.Verifier verifier)
public org.xml.sax.ErrorHandler getErrorHandler()
public void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
public void setVar(java.lang.String var)
protected void handleValid(boolean valid)
protected void outputException(org.apache.commons.jelly.XMLOutput output, java.lang.String name, org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
org.xml.sax.SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |