FileDocCategorySizeDatePackage
XmlParseTEI.javaAPI DocGlassfish v2 API3111Sat May 05 19:18:02 BST 2007org.apache.taglibs.standard.tei

XmlParseTEI

public class XmlParseTEI extends javax.servlet.jsp.tagext.TagExtraInfo

An implementation of TagExtraInfo that implements validation for 's attributes

author
Shawn Bayern

Fields Summary
private static final String
VAR
private static final String
VAR_DOM
private static final String
SCOPE
private static final String
SCOPE_DOM
Constructors Summary
Methods Summary
public booleanisValid(javax.servlet.jsp.tagext.TagData us)


        
	// must have no more than one of VAR and VAR_DOM ...
	if (Util.isSpecified(us, VAR) && Util.isSpecified(us, VAR_DOM))
	    return false;

	// ... and must have no less than one of VAR and VAR_DOM
	if (!(Util.isSpecified(us, VAR) || Util.isSpecified(us, VAR_DOM)))
	    return false;

	// When either 'scope' is specified, its 'var' must be specified
	if (Util.isSpecified(us, SCOPE) && !Util.isSpecified(us, VAR))
	    return false;
	if (Util.isSpecified(us, SCOPE_DOM) && !Util.isSpecified(us, VAR_DOM))
	    return false;

        return true;