Class XRTreeFragSelectWrapper

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, javax.xml.transform.SourceLocator, ExpressionNode, XPathVisitable

    public class XRTreeFragSelectWrapper
    extends XRTreeFrag
    implements java.lang.Cloneable
    This class makes an select statement act like an result tree fragment.
    See Also:
    Serialized Form
    • Constructor Detail

      • XRTreeFragSelectWrapper

        public XRTreeFragSelectWrapper​(Expression expr)
    • Method Detail

      • fixupVariables

        public void fixupVariables​(java.util.Vector vars,
                                   int globalsSize)
        This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time.
        Overrides:
        fixupVariables in class XObject
        Parameters:
        vars - List of QNames that correspond to variables. This list should be searched backwards for the first qualified name that corresponds to the variable reference qname. The position of the QName in the vector from the start of the vector will be its position in the stack frame (but variables above the globalsTop value will need to be offset to the current stack frame).
      • execute

        public XObject execute​(XPathContext xctxt)
                        throws javax.xml.transform.TransformerException
        For support of literal objects in xpaths.
        Overrides:
        execute in class XObject
        Parameters:
        xctxt - The XPath execution context.
        Returns:
        the result of executing the select expression
        Throws:
        javax.xml.transform.TransformerException
      • detach

        public void detach()
        Detaches the DTMIterator from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state. After detach has been invoked, calls to nextNode or previousNode will raise a runtime exception. In general, detach should only be called once on the object.
        Overrides:
        detach in class XRTreeFrag
      • num

        public double num()
                   throws javax.xml.transform.TransformerException
        Cast result object to a number.
        Overrides:
        num in class XRTreeFrag
        Returns:
        The result tree fragment as a number or NaN
        Throws:
        javax.xml.transform.TransformerException
      • xstr

        public XMLString xstr()
        Cast result object to an XMLString.
        Overrides:
        xstr in class XRTreeFrag
        Returns:
        The document fragment node data or the empty string.
      • str

        public java.lang.String str()
        Cast result object to a string.
        Overrides:
        str in class XRTreeFrag
        Returns:
        The document fragment node data or the empty string.
      • getType

        public int getType()
        Tell what kind of class this is.
        Overrides:
        getType in class XRTreeFrag
        Returns:
        the string type
      • rtf

        public int rtf()
        Cast result object to a result tree fragment.
        Overrides:
        rtf in class XRTreeFrag
        Returns:
        The document fragment this wraps
      • asNodeIterator

        public DTMIterator asNodeIterator()
        Cast result object to a DTMIterator.
        Overrides:
        asNodeIterator in class XRTreeFrag
        Returns:
        The document fragment as a DTMIterator