Package net.sf.saxon.expr
Class StaticProperty
java.lang.Object
net.sf.saxon.expr.StaticProperty
This class contains constants identifying dependencies that an XPath expression
might have on its context.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
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 final int
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:untypedstatic final int
Bit set if multiple values are allowedstatic final int
Bit set if a single value is allowedstatic final int
Occurence indicator for "one or more" (+)static final int
static final int
Occurrence indicator for "zero or more" (*)static final int
Occurence indicator for "zero or one" (?)static final int
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 nodestatic final int
Mask for all cardinality bitsstatic final int
Expression property: this bit indicates that the result of an expression will be a function other than a map or arraystatic final int
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 final int
Mask to select all the dependency bitsstatic final int
Bit setting: Expression depends on assignable global variablesstatic final int
Bit setting: Expression depends on the document containing the context nodestatic final int
Bit setting: Expression depends on context item.static final int
Bit setting: Expression depends on current-group() and/or current-grouping-key()static final int
Bit setting: Expression depends on current() itemstatic final int
Combination of bits representing dependencies on the focusstatic final int
Bit setting: Expression depends on last()static final int
Bit setting: Expression depends on local variables (excluding local variables declared within the expression itself)static final int
Combination of bits representing dependencies on the focus, but excluding dependencies on the current documentstatic final int
Bit setting: Expression binds (and typically references) its own range variablesstatic final int
Bit setting: Expression depends on position()static final int
Bit setting: Expression depends on regex-group()static final int
Bit setting: Expression can't be evaluated at compile time for reasons other than the abovestatic final int
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 collationstatic final int
Bit setting: Expression depends on user-defined functionsstatic final int
Combination of bits representing dependencies on the XSLT contextstatic final int
Occurence indicator when an empty sequence is requiredstatic final int
Occurence indicator for "exactly one" (default occurrence indicator)static final int
Expression property: this bit indicates that an expression has (or might have) side-effects.static final int
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 final int
Mask for nodeset-related propertiesstatic final int
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 final int
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 final int
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 final int
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 final int
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 final int
Mask for "special properties": that is, all properties other than cardinality and dependenciesstatic final int
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
Modifier and TypeMethodDescriptionstatic String
display
(int props) static int
getCardinalityCode
(int cardinality) Reduce the cardinality value to an integer in the range 0-7
-
Field Details
-
DEPENDS_ON_CURRENT_ITEM
public static final int DEPENDS_ON_CURRENT_ITEMBit setting: Expression depends on current() item- See Also:
-
DEPENDS_ON_CONTEXT_ITEM
public static final int DEPENDS_ON_CONTEXT_ITEMBit setting: Expression depends on context item. This setting is NOT used where the expression depends only on the context document: that is indicated byDEPENDS_ON_CONTEXT_DOCUMENT
.- See Also:
-
DEPENDS_ON_POSITION
public static final int DEPENDS_ON_POSITIONBit setting: Expression depends on position()- See Also:
-
DEPENDS_ON_LAST
public static final int DEPENDS_ON_LASTBit setting: Expression depends on last()- See Also:
-
DEPENDS_ON_CONTEXT_DOCUMENT
public static final int DEPENDS_ON_CONTEXT_DOCUMENTBit setting: Expression depends on the document containing the context node- See Also:
-
DEPENDS_ON_CURRENT_GROUP
public static final int DEPENDS_ON_CURRENT_GROUPBit setting: Expression depends on current-group() and/or current-grouping-key()- See Also:
-
DEPENDS_ON_REGEX_GROUP
public static final int DEPENDS_ON_REGEX_GROUPBit setting: Expression depends on regex-group()- See Also:
-
DEPENDS_ON_LOCAL_VARIABLES
public static final int DEPENDS_ON_LOCAL_VARIABLESBit setting: Expression depends on local variables (excluding local variables declared within the expression itself)- See Also:
-
DEPENDS_ON_USER_FUNCTIONS
public static final int DEPENDS_ON_USER_FUNCTIONSBit setting: Expression depends on user-defined functions- See Also:
-
DEPENDS_ON_ASSIGNABLE_GLOBALS
public static final int DEPENDS_ON_ASSIGNABLE_GLOBALSBit setting: Expression depends on assignable global variables- See Also:
-
DEPENDS_ON_RUNTIME_ENVIRONMENT
public static final int DEPENDS_ON_RUNTIME_ENVIRONMENTBit setting: Expression can't be evaluated at compile time for reasons other than the above- See Also:
-
DEPENDS_ON_STATIC_CONTEXT
public static final int DEPENDS_ON_STATIC_CONTEXTBit 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:
-
DEPENDS_ON_OWN_RANGE_VARIABLES
public static final int DEPENDS_ON_OWN_RANGE_VARIABLESBit setting: Expression binds (and typically references) its own range variables- See Also:
-
DEPENDS_ON_XSLT_CONTEXT
public static final int DEPENDS_ON_XSLT_CONTEXTCombination of bits representing dependencies on the XSLT context- See Also:
-
DEPENDS_ON_FOCUS
public static final int DEPENDS_ON_FOCUSCombination of bits representing dependencies on the focus- See Also:
-
DEPENDS_ON_NON_DOCUMENT_FOCUS
public static final int DEPENDS_ON_NON_DOCUMENT_FOCUSCombination of bits representing dependencies on the focus, but excluding dependencies on the current document- See Also:
-
ALLOWS_ZERO
public static final int ALLOWS_ZERO- See Also:
-
ALLOWS_ONE
public static final int ALLOWS_ONEBit set if a single value is allowed- See Also:
-
ALLOWS_MANY
public static final int ALLOWS_MANYBit set if multiple values are allowed- See Also:
-
CARDINALITY_MASK
public static final int CARDINALITY_MASKMask for all cardinality bits- See Also:
-
ALLOWS_ONE_OR_MORE
public static final int ALLOWS_ONE_OR_MOREOccurence indicator for "one or more" (+)- See Also:
-
ALLOWS_ZERO_OR_MORE
public static final int ALLOWS_ZERO_OR_MOREOccurrence indicator for "zero or more" (*)- See Also:
-
ALLOWS_ZERO_OR_ONE
public static final int ALLOWS_ZERO_OR_ONEOccurence indicator for "zero or one" (?)- See Also:
-
EXACTLY_ONE
public static final int EXACTLY_ONEOccurence indicator for "exactly one" (default occurrence indicator)- See Also:
-
EMPTY
public static final int EMPTYOccurence indicator when an empty sequence is required- See Also:
-
CONTEXT_DOCUMENT_NODESET
public static final int CONTEXT_DOCUMENT_NODESETExpression 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:
-
ORDERED_NODESET
public static final int ORDERED_NODESETExpression 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:
-
REVERSE_DOCUMENT_ORDER
public static final int REVERSE_DOCUMENT_ORDERExpression 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:
-
PEER_NODESET
public static final int PEER_NODESETExpression 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:
-
SUBTREE_NODESET
public static final int SUBTREE_NODESETExpression 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:
-
ATTRIBUTE_NS_NODESET
public static final int ATTRIBUTE_NS_NODESETExpression 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:
-
ALL_NODES_NEWLY_CREATED
public static final int ALL_NODES_NEWLY_CREATEDExpression 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:
-
NO_NODES_NEWLY_CREATED
public static final int NO_NODES_NEWLY_CREATEDExpression 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:
-
SINGLE_DOCUMENT_NODESET
public static final int SINGLE_DOCUMENT_NODESETExpression 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:
-
HAS_SIDE_EFFECTS
public static final int HAS_SIDE_EFFECTSExpression 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:
-
NOT_UNTYPED_ATOMIC
public static final int NOT_UNTYPED_ATOMICExpression 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:
-
ALL_NODES_UNTYPED
public static final int ALL_NODES_UNTYPEDExpression 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:
-
COMPUTED_FUNCTION
public static final int COMPUTED_FUNCTIONExpression property: this bit indicates that the result of an expression will be a function other than a map or array- See Also:
-
DEPENDENCY_MASK
public static final int DEPENDENCY_MASKMask to select all the dependency bits- See Also:
-
SPECIAL_PROPERTY_MASK
public static final int SPECIAL_PROPERTY_MASKMask for "special properties": that is, all properties other than cardinality and dependencies- See Also:
-
NODESET_PROPERTIES
public static final int NODESET_PROPERTIESMask for nodeset-related properties- See Also:
-
-
Method Details
-
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
-