Class StaticProperty


  • public abstract class StaticProperty
    extends java.lang.Object
    This class contains constants identifying dependencies that an XPath expression might have on its context.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ALL_NODES_NEWLY_CREATED
      Expression property: this bit indicates that the expression will always create new nodes: more specifically, any node in the result of the expression is guaranteed to be a newly created node.
      static int ALL_NODES_UNTYPED
      Expression property: this bit indicates that in the result of an expression, any element and attribute nodes that are present will have type annotation xs:untyped or xs:untypedAtomic respectively, and that any document nodes that are present will have no element children whose type annotation is anything other than xs:untyped
      static int ALLOWS_MANY
      Bit set if multiple values are allowed
      static int ALLOWS_ONE
      Bit set if a single value is allowed
      static int ALLOWS_ONE_OR_MORE
      Occurence indicator for "one or more" (+)
      static int ALLOWS_ZERO  
      static int ALLOWS_ZERO_OR_MORE
      Occurence indicator for "zero or more" (*)
      static int ALLOWS_ZERO_OR_ONE
      Occurence indicator for "zero or one" (?)
      static int ATTRIBUTE_NS_NODESET
      Expression property: this bit is set by getProperties() in the case of an expression that delivers a set of nodes with the guarantee that every node in the result will be an attribute or namespace of the context node
      static int CARDINALITY_MASK
      Mask for all cardinality bits
      static int CONTEXT_DOCUMENT_NODESET
      Expression property: this bit is set by getProperties() in the case of an expression whose item type is node, when the nodes in the result are guaranteed all to be in the same document as the context node.
      static int DEPENDENCY_MASK
      Mask to select all the dependency bits
      static int DEPENDS_ON_ASSIGNABLE_GLOBALS
      Bit setting: Expression depends on assignable global variables
      static int DEPENDS_ON_CONTEXT_DOCUMENT
      Bit setting: Expression depends on the document containing the context node
      static int DEPENDS_ON_CONTEXT_ITEM
      Bit setting: Expression depends on context item.
      static int DEPENDS_ON_CURRENT_GROUP
      Bit setting: Expression depends on current-group() and/or current-grouping-key()
      static int DEPENDS_ON_CURRENT_ITEM
      Bit setting: Expression depends on current() item
      static int DEPENDS_ON_FOCUS
      Combination of bits representing dependencies on the focus
      static int DEPENDS_ON_LAST
      Bit setting: Expression depends on last()
      static int DEPENDS_ON_LOCAL_VARIABLES
      Bit setting: Expression depends on local variables
      static int DEPENDS_ON_NON_DOCUMENT_FOCUS
      Combination of bits representing dependencies on the focus, but excluding dependencies on the current document
      static int DEPENDS_ON_OWN_RANGE_VARIABLES
      Bit setting: Expression binds (and typically references) its own range variables
      static int DEPENDS_ON_POSITION
      Bit setting: Expression depends on position()
      static int DEPENDS_ON_REGEX_GROUP
      Bit setting: Expression depends on regex-group()
      static int DEPENDS_ON_RUNTIME_ENVIRONMENT
      Bit setting: Expression can't be evaluated at compile time for reasons other than the above
      static int DEPENDS_ON_STATIC_CONTEXT
      Bit setting: Expression depends on the static context, specifically, a part of the static context that can vary from one expression in a query/stylesheet to another; the main examples of this are the static base URI and the default collation
      static int DEPENDS_ON_USER_FUNCTIONS
      Bit setting: Expression depends on user-defined functions
      static int DEPENDS_ON_XSLT_CONTEXT
      Combination of bits representing dependencies on the XSLT context
      static int EMPTY
      Occurence indicator when an empty sequence is required
      static int EXACTLY_ONE
      Occurence indicator for "exactly one" (default occurrence indicator)
      static int HAS_SIDE_EFFECTS
      Expression property: this bit indicates that an expression has (or might have) side-effects.
      static int NO_NODES_NEWLY_CREATED
      Expression property: this bit is set in the case of an expression that will never return newly created nodes, nor a value that depends on the identity of newly created nodes (for example generate-id(new-node())).
      static int NODESET_PROPERTIES
      Mask for nodeset-related properties
      static int NOT_UNTYPED_ATOMIC
      Expression property: this bit indicates that although the static type of the expression permits untyped atomic values, it is known that the value will not be untyped atomic.
      static int ORDERED_NODESET
      Expression property: this bit is set by getProperties() in the case of an expression whose item type is node, when the nodes in the result are in document order.
      static int PEER_NODESET
      Expression property: this bit is set by getProperties() in the case of an expression that delivers a set of nodes with the guarantee that no node in the set will be an ancestor of any other.
      static int REVERSE_DOCUMENT_ORDER
      Expression property: this bit is set by getProperties() in the case of an expression that delivers items in the reverse of the correct order, when unordered retrieval is requested.
      static int SINGLE_DOCUMENT_NODESET
      Expression property: this bit is set in the case of an expression that delivers a set of nodes that are all in the same document (not necessarily the same document as the context node).
      static int SPECIAL_PROPERTY_MASK
      Mask for "special properties": that is, all properties other than cardinality and dependencies
      static int SUBTREE_NODESET
      Expression property: this bit is set by getProperties() in the case of an expression that delivers a set of nodes with the guarantee that every node in the result will be a descendant or self, or attribute or namespace, of the context node
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String display​(int props)  
      static int getCardinalityCode​(int cardinality)
      Reduce the cardinality value to an integer in the range 0-7
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEPENDS_ON_CURRENT_ITEM

        public static final int DEPENDS_ON_CURRENT_ITEM
        Bit setting: Expression depends on current() item
        See Also:
        Constant Field Values
      • DEPENDS_ON_CONTEXT_ITEM

        public static final int DEPENDS_ON_CONTEXT_ITEM
        Bit setting: Expression depends on context item. This setting is NOT used where the expression depends only on the context document: that is indicated by DEPENDS_ON_CONTEXT_DOCUMENT.
        See Also:
        Constant Field Values
      • DEPENDS_ON_POSITION

        public static final int DEPENDS_ON_POSITION
        Bit setting: Expression depends on position()
        See Also:
        Constant Field Values
      • DEPENDS_ON_LAST

        public static final int DEPENDS_ON_LAST
        Bit setting: Expression depends on last()
        See Also:
        Constant Field Values
      • DEPENDS_ON_CONTEXT_DOCUMENT

        public static final int DEPENDS_ON_CONTEXT_DOCUMENT
        Bit setting: Expression depends on the document containing the context node
        See Also:
        Constant Field Values
      • DEPENDS_ON_CURRENT_GROUP

        public static final int DEPENDS_ON_CURRENT_GROUP
        Bit setting: Expression depends on current-group() and/or current-grouping-key()
        See Also:
        Constant Field Values
      • DEPENDS_ON_REGEX_GROUP

        public static final int DEPENDS_ON_REGEX_GROUP
        Bit setting: Expression depends on regex-group()
        See Also:
        Constant Field Values
      • DEPENDS_ON_LOCAL_VARIABLES

        public static final int DEPENDS_ON_LOCAL_VARIABLES
        Bit setting: Expression depends on local variables
        See Also:
        Constant Field Values
      • DEPENDS_ON_USER_FUNCTIONS

        public static final int DEPENDS_ON_USER_FUNCTIONS
        Bit setting: Expression depends on user-defined functions
        See Also:
        Constant Field Values
      • DEPENDS_ON_ASSIGNABLE_GLOBALS

        public static final int DEPENDS_ON_ASSIGNABLE_GLOBALS
        Bit setting: Expression depends on assignable global variables
        See Also:
        Constant Field Values
      • DEPENDS_ON_RUNTIME_ENVIRONMENT

        public static final int DEPENDS_ON_RUNTIME_ENVIRONMENT
        Bit setting: Expression can't be evaluated at compile time for reasons other than the above
        See Also:
        Constant Field Values
      • DEPENDS_ON_STATIC_CONTEXT

        public static final int DEPENDS_ON_STATIC_CONTEXT
        Bit setting: Expression depends on the static context, specifically, a part of the static context that can vary from one expression in a query/stylesheet to another; the main examples of this are the static base URI and the default collation
        See Also:
        Constant Field Values
      • DEPENDS_ON_OWN_RANGE_VARIABLES

        public static final int DEPENDS_ON_OWN_RANGE_VARIABLES
        Bit setting: Expression binds (and typically references) its own range variables
        See Also:
        Constant Field Values
      • DEPENDS_ON_XSLT_CONTEXT

        public static final int DEPENDS_ON_XSLT_CONTEXT
        Combination of bits representing dependencies on the XSLT context
        See Also:
        Constant Field Values
      • DEPENDS_ON_FOCUS

        public static final int DEPENDS_ON_FOCUS
        Combination of bits representing dependencies on the focus
        See Also:
        Constant Field Values
      • DEPENDS_ON_NON_DOCUMENT_FOCUS

        public static final int DEPENDS_ON_NON_DOCUMENT_FOCUS
        Combination of bits representing dependencies on the focus, but excluding dependencies on the current document
        See Also:
        Constant Field Values
      • ALLOWS_ONE

        public static final int ALLOWS_ONE
        Bit set if a single value is allowed
        See Also:
        Constant Field Values
      • ALLOWS_MANY

        public static final int ALLOWS_MANY
        Bit set if multiple values are allowed
        See Also:
        Constant Field Values
      • CARDINALITY_MASK

        public static final int CARDINALITY_MASK
        Mask for all cardinality bits
        See Also:
        Constant Field Values
      • ALLOWS_ONE_OR_MORE

        public static final int ALLOWS_ONE_OR_MORE
        Occurence indicator for "one or more" (+)
        See Also:
        Constant Field Values
      • ALLOWS_ZERO_OR_MORE

        public static final int ALLOWS_ZERO_OR_MORE
        Occurence indicator for "zero or more" (*)
        See Also:
        Constant Field Values
      • ALLOWS_ZERO_OR_ONE

        public static final int ALLOWS_ZERO_OR_ONE
        Occurence indicator for "zero or one" (?)
        See Also:
        Constant Field Values
      • EXACTLY_ONE

        public static final int EXACTLY_ONE
        Occurence indicator for "exactly one" (default occurrence indicator)
        See Also:
        Constant Field Values
      • EMPTY

        public static final int EMPTY
        Occurence indicator when an empty sequence is required
        See Also:
        Constant Field Values
      • CONTEXT_DOCUMENT_NODESET

        public static final int CONTEXT_DOCUMENT_NODESET
        Expression property: this bit is set by getProperties() in the case of an expression whose item type is node, when the nodes in the result are guaranteed all to be in the same document as the context node. For expressions that return values other than nodes, the setting is undefined.
        See Also:
        Constant Field Values
      • ORDERED_NODESET

        public static final int ORDERED_NODESET
        Expression property: this bit is set by getProperties() in the case of an expression whose item type is node, when the nodes in the result are in document order.
        See Also:
        Constant Field Values
      • REVERSE_DOCUMENT_ORDER

        public static final int REVERSE_DOCUMENT_ORDER
        Expression property: this bit is set by getProperties() in the case of an expression that delivers items in the reverse of the correct order, when unordered retrieval is requested.
        See Also:
        Constant Field Values
      • PEER_NODESET

        public static final int PEER_NODESET
        Expression property: this bit is set by getProperties() in the case of an expression that delivers a set of nodes with the guarantee that no node in the set will be an ancestor of any other. This property is useful in deciding whether the results of a path expression are pre-sorted. The property is only used in the case where the ORDERED_NODESET property is true, so there is no point in setting it in other cases.
        See Also:
        Constant Field Values
      • SUBTREE_NODESET

        public static final int SUBTREE_NODESET
        Expression property: this bit is set by getProperties() in the case of an expression that delivers a set of nodes with the guarantee that every node in the result will be a descendant or self, or attribute or namespace, of the context node
        See Also:
        Constant Field Values
      • ATTRIBUTE_NS_NODESET

        public static final int ATTRIBUTE_NS_NODESET
        Expression property: this bit is set by getProperties() in the case of an expression that delivers a set of nodes with the guarantee that every node in the result will be an attribute or namespace of the context node
        See Also:
        Constant Field Values
      • ALL_NODES_NEWLY_CREATED

        public static final int ALL_NODES_NEWLY_CREATED
        Expression property: this bit indicates that the expression will always create new nodes: more specifically, any node in the result of the expression is guaranteed to be a newly created node.
        See Also:
        Constant Field Values
      • NO_NODES_NEWLY_CREATED

        public static final int NO_NODES_NEWLY_CREATED
        Expression property: this bit is set in the case of an expression that will never return newly created nodes, nor a value that depends on the identity of newly created nodes (for example generate-id(new-node())). Expressions that are capable of creating new nodes cannot be moved out of loops as this could cause too few nodes to be created: for example if f() creates a new node, then count(for $i in 1 to 5 return f()) must be 5.
        See Also:
        Constant Field Values
      • SINGLE_DOCUMENT_NODESET

        public static final int SINGLE_DOCUMENT_NODESET
        Expression property: this bit is set in the case of an expression that delivers a set of nodes that are all in the same document (not necessarily the same document as the context node).
        See Also:
        Constant Field Values
      • HAS_SIDE_EFFECTS

        public static final int HAS_SIDE_EFFECTS
        Expression property: this bit indicates that an expression has (or might have) side-effects. This property is applied to calls on extension functions and to certain instructions such as xsl:result-document and xsl:message.
        See Also:
        Constant Field Values
      • NOT_UNTYPED_ATOMIC

        public static final int NOT_UNTYPED_ATOMIC
        Expression property: this bit indicates that although the static type of the expression permits untyped atomic values, it is known that the value will not be untyped atomic.
        See Also:
        Constant Field Values
      • ALL_NODES_UNTYPED

        public static final int ALL_NODES_UNTYPED
        Expression property: this bit indicates that in the result of an expression, any element and attribute nodes that are present will have type annotation xs:untyped or xs:untypedAtomic respectively, and that any document nodes that are present will have no element children whose type annotation is anything other than xs:untyped
        See Also:
        Constant Field Values
      • DEPENDENCY_MASK

        public static final int DEPENDENCY_MASK
        Mask to select all the dependency bits
        See Also:
        Constant Field Values
      • SPECIAL_PROPERTY_MASK

        public static final int SPECIAL_PROPERTY_MASK
        Mask for "special properties": that is, all properties other than cardinality and dependencies
        See Also:
        Constant Field Values
      • NODESET_PROPERTIES

        public static final int NODESET_PROPERTIES
        Mask for nodeset-related properties
        See Also:
        Constant Field Values
    • Method Detail

      • getCardinalityCode

        public static int getCardinalityCode​(int cardinality)
        Reduce the cardinality value to an integer in the range 0-7
        Parameters:
        cardinality - the result of calling getCardinality() on an expression
        Returns:
        the cardinality code
      • display

        public static java.lang.String display​(int props)