com.ora.jsp.tlv
Class OraTLV
java.lang.Object
javax.servlet.jsp.tagext.TagLibraryValidator
com.ora.jsp.tlv.OraTLV
- public class OraTLV
- extends javax.servlet.jsp.tagext.TagLibraryValidator
This is an example of a TagLibraryValidator class. It only validates
the use of the dummy <xmp:child> action element in a dummy tag
library, but it serves as an extendable validator for a real tag
library.
- Version:
- 2.0
- Author:
- Hans Bergsten, Gefion software
Field Summary |
private org.jdom.input.SAXBuilder |
builder
|
private org.jdom.Namespace |
jspNamespace
|
Fields inherited from class javax.servlet.jsp.tagext.TagLibraryValidator |
|
Method Summary |
private org.jdom.Element |
findParent(org.jdom.Element e,
org.jdom.Namespace ns,
java.lang.String name)
Returns the closest parent element of the specified element that
matches the specified namespace and name. |
javax.servlet.jsp.tagext.ValidationMessage[] |
validate(java.lang.String prefix,
java.lang.String uri,
javax.servlet.jsp.tagext.PageData pd)
Returns a ValidationMessage array with information about validation
errors, or null if no errors are found. |
private void |
validateChild(org.jdom.Element e,
org.jdom.Namespace ns,
java.util.ArrayList msgs)
Validates that a "child" element is only used within the body of
a "parent" element. |
private void |
validateElement(org.jdom.Element e,
org.jdom.Namespace ns,
java.util.ArrayList msgs)
Dispatches to the appropriate validation method for the
specified element, and calls itself recursively for all
children of the element. |
Methods inherited from class javax.servlet.jsp.tagext.TagLibraryValidator |
getInitParameters, release, setInitParameters |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
builder
private org.jdom.input.SAXBuilder builder
jspNamespace
private org.jdom.Namespace jspNamespace
OraTLV
public OraTLV()
validate
public javax.servlet.jsp.tagext.ValidationMessage[] validate(java.lang.String prefix,
java.lang.String uri,
javax.servlet.jsp.tagext.PageData pd)
- Returns a ValidationMessage array with information about validation
errors, or null if no errors are found.
validateElement
private void validateElement(org.jdom.Element e,
org.jdom.Namespace ns,
java.util.ArrayList msgs)
- Dispatches to the appropriate validation method for the
specified element, and calls itself recursively for all
children of the element.
validateChild
private void validateChild(org.jdom.Element e,
org.jdom.Namespace ns,
java.util.ArrayList msgs)
- Validates that a "child" element is only used within the body of
a "parent" element. If not, a ValidationMessage is added to the
message array.
findParent
private org.jdom.Element findParent(org.jdom.Element e,
org.jdom.Namespace ns,
java.lang.String name)
- Returns the closest parent element of the specified element that
matches the specified namespace and name.