Class ElemIf

    • Constructor Detail

      • ElemIf

        public ElemIf()
    • Method Detail

      • setTest

        public void setTest​(XPath v)
        Set the "test" attribute. The xsl:if element must have a test attribute, which specifies an expression.
        Parameters:
        v - test attribute to set
      • getTest

        public XPath getTest()
        Get the "test" attribute. The xsl:if element must have a test attribute, which specifies an expression.
        Returns:
        the "test" attribute for this element.
      • compose

        public void compose​(StylesheetRoot sroot)
                     throws javax.xml.transform.TransformerException
        This function is called after everything else has been recomposed, and allows the template to set remaining values that may be based on some other property that depends on recomposition.
        Overrides:
        compose in class ElemTemplateElement
        Parameters:
        sroot - The root stylesheet.
        Throws:
        javax.xml.transform.TransformerException
      • getXSLToken

        public int getXSLToken()
        Get an int constant identifying the type of element.
        Overrides:
        getXSLToken in class ElemTemplateElement
        Returns:
        The token ID for this element
        See Also:
        Constants
      • getNodeName

        public java.lang.String getNodeName()
        Return the node name.
        Specified by:
        getNodeName in interface org.w3c.dom.Node
        Overrides:
        getNodeName in class ElemTemplateElement
        Returns:
        the element's name
      • execute

        public void execute​(TransformerImpl transformer)
                     throws javax.xml.transform.TransformerException
        Conditionally execute a sub-template. The expression is evaluated and the resulting object is converted to a boolean as if by a call to the boolean function. If the result is true, then the content template is instantiated; otherwise, nothing is created.
        Overrides:
        execute in class ElemTemplateElement
        Parameters:
        transformer - non-null reference to the the current transform-time state.
        Throws:
        javax.xml.transform.TransformerException