Class StringLength

    • Constructor Detail

      • StringLength

        public StringLength()
    • Method Detail

      • getIntrinsicDependencies

        public int getIntrinsicDependencies()
        Determine the intrinsic dependencies of an expression, that is, those which are not derived from the dependencies of its subexpressions. For example, position() has an intrinsic dependency on the context position, while (position()+1) does not. The default implementation of the method returns 0, indicating "no dependencies".
        Overrides:
        getIntrinsicDependencies in class ComputedExpression
        Returns:
        a set of bit-significant flags identifying the "intrinsic" dependencies. The flags are documented in class net.sf.saxon.value.StaticProperty
      • setShortcut

        public void setShortcut()
        setShortCut() - used by optimizer when we only need to know if the length is non-zero
      • evaluateItem

        public Item evaluateItem​(XPathContext c)
                          throws XPathException
        Evaluate in a general context
        Specified by:
        evaluateItem in interface Expression
        Overrides:
        evaluateItem in class ComputedExpression
        Parameters:
        c - The context in which the expression is to be evaluated
        Returns:
        the node or atomic value that results from evaluating the expression; or null to indicate that the result is an empty sequence
        Throws:
        XPathException - if any dynamic error occurs evaluating the expression