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

java.lang.Object
  |
  +--org.apache.commons.jelly.TagSupport
        |
        +--org.apache.commons.jelly.tags.validate.ValidateTag
              |
              +--org.apache.commons.jelly.tags.validate.AssertValidTag
All Implemented Interfaces:
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: 1.1 $
Author:
James Strachan

Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
AssertValidTag()
           
 
Method Summary
 void doTag(XMLOutput output)
          Evaluates this tag after all the tags properties have been initialized.
protected  void handleValid(boolean valid)
          Processes whether or not the document is valid.
protected  void outputException(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, 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
 

Constructor Detail

AssertValidTag

public AssertValidTag()
Method Detail

doTag

public void doTag(XMLOutput output)
           throws java.lang.Exception
Description copied from interface: Tag
Evaluates this tag after all the tags properties have been initialized.
Overrides:
doTag in class ValidateTag

handleValid

protected void handleValid(boolean valid)
                    throws java.lang.Exception
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(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


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