Class TransformSupport

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
    Direct Known Subclasses:
    TransformTag, TransformTag, TransformTag

    public abstract class TransformSupport
    extends javax.servlet.jsp.tagext.BodyTagSupport

    Support for tag handlers for <transform>, the XML transformation tag.

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private XmlUtil.JstlEntityResolver entityResolver  
      protected javax.xml.transform.Result result  
      private int scope  
      private javax.xml.transform.Transformer t  
      private XmlUtil.JstlUriResolver uriResolver  
      private java.lang.String var  
      protected java.lang.Object xml  
      protected boolean xmlSpecified  
      protected java.lang.String xmlSystemId  
      protected java.lang.Object xslt  
      protected java.lang.String xsltSystemId  
      • Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport

        bodyContent
      • Fields inherited from class javax.servlet.jsp.tagext.TagSupport

        id, pageContext
      • Fields inherited from interface javax.servlet.jsp.tagext.BodyTag

        EVAL_BODY_BUFFERED, EVAL_BODY_TAG
      • Fields inherited from interface javax.servlet.jsp.tagext.IterationTag

        EVAL_BODY_AGAIN
      • Fields inherited from interface javax.servlet.jsp.tagext.Tag

        EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addParameter​(java.lang.String name, java.lang.Object value)
      Sets (adds) a transformation parameter on our transformer.
      int doEndTag()  
      int doStartTag()  
      (package private) javax.xml.transform.Source getSourceFromBodyContent()
      Return the Source for a document specified as body content.
      (package private) javax.xml.transform.Source getSourceFromXmlAttribute()
      Return the Source for a document specified in the "doc" or "xml" attribute.
      private void init()  
      void release()  
      void setPageContext​(javax.servlet.jsp.PageContext pageContext)  
      void setScope​(java.lang.String scope)  
      void setVar​(java.lang.String var)  
      • Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport

        doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent
      • Methods inherited from class javax.servlet.jsp.tagext.TagSupport

        findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.servlet.jsp.tagext.Tag

        getParent, setParent
    • Field Detail

      • xml

        protected java.lang.Object xml
      • xmlSpecified

        protected boolean xmlSpecified
      • xmlSystemId

        protected java.lang.String xmlSystemId
      • xslt

        protected java.lang.Object xslt
      • xsltSystemId

        protected java.lang.String xsltSystemId
      • result

        protected javax.xml.transform.Result result
      • var

        private java.lang.String var
      • scope

        private int scope
      • t

        private javax.xml.transform.Transformer t
    • Constructor Detail

      • TransformSupport

        public TransformSupport()
    • Method Detail

      • init

        private void init()
      • doStartTag

        public int doStartTag()
                       throws javax.servlet.jsp.JspException
        Specified by:
        doStartTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
        Throws:
        javax.servlet.jsp.JspException
      • doEndTag

        public int doEndTag()
                     throws javax.servlet.jsp.JspException
        Specified by:
        doEndTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
        Throws:
        javax.servlet.jsp.JspException
      • release

        public void release()
        Specified by:
        release in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        release in class javax.servlet.jsp.tagext.BodyTagSupport
      • setPageContext

        public void setPageContext​(javax.servlet.jsp.PageContext pageContext)
        Specified by:
        setPageContext in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        setPageContext in class javax.servlet.jsp.tagext.TagSupport
      • addParameter

        public void addParameter​(java.lang.String name,
                                 java.lang.Object value)
        Sets (adds) a transformation parameter on our transformer.
      • getSourceFromXmlAttribute

        javax.xml.transform.Source getSourceFromXmlAttribute()
                                                      throws javax.servlet.jsp.JspTagException,
                                                             org.xml.sax.SAXException,
                                                             javax.xml.parsers.ParserConfigurationException
        Return the Source for a document specified in the "doc" or "xml" attribute.
        Returns:
        the document Source
        Throws:
        javax.servlet.jsp.JspTagException - if there is a problem with the attribute
        org.xml.sax.SAXException
        javax.xml.parsers.ParserConfigurationException
      • getSourceFromBodyContent

        javax.xml.transform.Source getSourceFromBodyContent()
                                                     throws javax.servlet.jsp.JspTagException,
                                                            org.xml.sax.SAXException,
                                                            javax.xml.parsers.ParserConfigurationException
        Return the Source for a document specified as body content.
        Returns:
        the document Source
        Throws:
        javax.servlet.jsp.JspTagException - if there is a problem with the body content
        org.xml.sax.SAXException
        javax.xml.parsers.ParserConfigurationException
      • setVar

        public void setVar​(java.lang.String var)
      • setScope

        public void setScope​(java.lang.String scope)