FileDocCategorySizeDatePackage
TransformTag.javaAPI DocGlassfish v2 API5817Sat May 05 19:17:58 BST 2007org.apache.taglibs.standard.tag.el.xml

TransformTag

public class TransformTag extends org.apache.taglibs.standard.tag.common.xml.TransformSupport

A handler for <transform> that accepts attributes as Strings and evaluates them as expressions at runtime.

author
Shawn Bayern

Fields Summary
private String
xml_
private String
xmlSystemId_
private String
xslt_
private String
xsltSystemId_
private String
result_
Constructors Summary
public TransformTag()

        super();
        init();
    
Methods Summary
public intdoStartTag()


        // evaluate any expressions we were passed, once per invocation
        evaluateExpressions();

	// chain to the parent implementation
	return super.doStartTag();
    
private voidevaluateExpressions()

        /* 
         * Note: we don't check for type mismatches here; we assume
         * the expression evaluator will return the expected type
         * (by virtue of knowledge we give it about what that type is).
         * A ClassCastException here is truly unexpected, so we let it
         * propagate up.
         */

	xml = ExpressionUtil.evalNotNull(
	    "transform", "xml", xml_, Object.class, this, pageContext);
	xmlSystemId = (String) ExpressionUtil.evalNotNull(
	    "transform", "xmlSystemId", xmlSystemId_, String.class,
            this, pageContext);
	xslt= ExpressionUtil.evalNotNull(
	    "transform", "xslt", xslt_, Object.class, this,
	    pageContext);
	xsltSystemId = (String) ExpressionUtil.evalNotNull(
	    "transform", "xsltSystemId", xsltSystemId_, String.class,
	    this, pageContext);
	result = (Result) ExpressionUtil.evalNotNull(
	    "transform", "result", result_, Result.class, this, pageContext);

    
private voidinit()

        // null implies "no expression"
	xml_ = xmlSystemId = xslt_ = xsltSystemId_ = result_ = null;
    
public voidrelease()

        super.release();
        init();
    
public voidsetResult(java.lang.String result_)

        this.result_ = result_;
    
public voidsetXml(java.lang.String xml_)

        this.xml_ = xml_;
    
public voidsetXmlSystemId(java.lang.String xmlSystemId_)

        this.xmlSystemId_ = xmlSystemId_;
    
public voidsetXslt(java.lang.String xslt_)

        this.xslt_ = xslt_;
    
public voidsetXsltSystemId(java.lang.String xsltSystemId_)

        this.xsltSystemId_ = xsltSystemId_;