org.apache.commons.jelly.tags.validate
Class AssertValidTag

java.lang.Object
  extended byorg.apache.commons.jelly.TagSupport
      extended byorg.apache.commons.jelly.tags.validate.ValidateTag
          extended byorg.apache.commons.jelly.tags.validate.AssertValidTag
All Implemented Interfaces:
org.apache.commons.jelly.Tag

public class AssertValidTag
extends ValidateTag

This tag performs an assertion that the tags body contains XML which matches a givem schema validation. This tag is used with JellyUnit to implement an assertion.

Version:
$Revision: 155420 $
Author:
James Strachan

Field Summary
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
AssertValidTag()
           
 
Method Summary
 void doTag(org.apache.commons.jelly.XMLOutput output)
           
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
 
Methods inherited from class org.apache.commons.jelly.tags.validate.ValidateTag
getErrorHandler, setErrorHandler, setVar, setVerifier
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssertValidTag

public AssertValidTag()
Method Detail

doTag

public void doTag(org.apache.commons.jelly.XMLOutput output)
           throws org.apache.commons.jelly.JellyTagException
Specified by:
doTag in interface org.apache.commons.jelly.Tag
Overrides:
doTag in class ValidateTag
Throws:
org.apache.commons.jelly.JellyTagException

handleValid

protected void handleValid(boolean valid)
Processes whether or not the document is valid. Derived classes can overload this method to do different things, such as to throw assertion exceptions etc.

Overrides:
handleValid in class ValidateTag

outputException

protected void outputException(org.apache.commons.jelly.XMLOutput output,
                               java.lang.String name,
                               org.xml.sax.SAXParseException e)
                        throws org.xml.sax.SAXException
Outputs the given validation exception as XML to the output

Overrides:
outputException in class ValidateTag
Throws:
org.xml.sax.SAXException


Copyright © 2002-2006 Apache Software Foundation. All Rights Reserved.