Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.saxonica.functions.xslt3
Class SnapshotFn

    java.lang.Object
      net.sf.saxon.expr.Expression
          net.sf.saxon.expr.FunctionCall
              net.sf.saxon.functions.SystemFunction
                  com.saxonica.functions.xslt3.SnapshotFn

All Implemented Interfaces:
  Serializable, SourceLocator, LocationProvider, SaxonLocator, InstructionInfo, Locator

    public class SnapshotFn

extends SystemFunction

XSLT 3.0 function snapshot(). This is like a deep-copy except that it also includes a shallow copy of all ancestors.

See Also:
  Serialized Form

Field Summary

Fields inherited from class net.sf.saxon.functions.SystemFunction
`operation`

Fields inherited from class net.sf.saxon.expr.FunctionCall
`argument`

Fields inherited from class net.sf.saxon.expr.Expression
`EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, EVENT_FEED_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, locationId, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, PUSH_SELECTION, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, WATCH_METHOD`

Constructor Summary
`SnapshotFn()`

Method Summary
`PathMap.PathMapNodeSet` | `addToPathMap(PathMap pathMap, PathMap.PathMapNodeSet pathMapNodeSet)` Add a representation of this expression to a PathMap.
`Item` | `evaluateItem(XPathContext context)` Evaluate an expression as a single item.
`Expression` | `simplify(ExpressionVisitor visitor)` Simplify and validate.

Methods inherited from class net.sf.saxon.functions.SystemFunction
`addContextDocumentArgument, addDocToPathMap, checkArguments, computeCardinality, computeSpecialProperties, copy, equals, getDetails, getErrorCodeForTypeErrors, getImplementationMethod, getItemType, getOperation, getRequiredType, makeSystemFunction, optimize, setDetails, useContextItemAsDefault`

Methods inherited from class net.sf.saxon.expr.FunctionCall
`addExternalFunctionCallToPathMap, checkArgumentCount, explain, getArguments, getDisplayName, getExpressionName, getFunctionName, getNumberOfArguments, hashCode, iterateSubExpressions, preEvaluate, promote, replaceSubExpression, setArguments, setFunctionName, simplifyArguments, toString, typeCheck`

Methods inherited from class net.sf.saxon.expr.Expression
`adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluatePendingUpdates, explain, getCardinality, getColumnNumber, getColumnNumber, getConstructType, getContainer, getDependencies, getEvaluationMethod, getExecutable, getHostLanguage, getIntegerBounds, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, hasVariableBinding, implementsStaticTypeCheck, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterate, iterateEvents, iterateSameFocusSubExpressions, markTailFunctionCalls, process, resetLocalStaticProperties, setContainer, setEvaluationMethod, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, typeError`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SnapshotFn

    public SnapshotFn()

Method Detail

### simplify

    public Expression simplify(ExpressionVisitor visitor)
                        throws XPathException

  Simplify and validate.

  Overrides:
    `simplify` in class `FunctionCall`
  Parameters:
    `visitor` - an expression visitor
  Returns:
    the simplified expression
  Throws:
    `XPathException` - if an error is discovered during expression rewriting

### addToPathMap

    public PathMap.PathMapNodeSet addToPathMap(PathMap pathMap,
                                               PathMap.PathMapNodeSet pathMapNodeSet)

  Description copied from class: `Expression`
  Add a representation of this expression to a PathMap. The PathMap captures a map of the nodes visited by an expression in a source tree.

  The default implementation of this method assumes that an expression does no navigation other than the navigation done by evaluating its subexpressions, and that the subexpressions are evaluated in the same context as the containing expression. The method must be overridden for any expression where these assumptions do not hold. For example, implementations exist for AxisExpression, ParentExpression, and RootExpression (because they perform navigation), and for the doc(), document(), and collection() functions because they create a new navigation root. Implementations also exist for PathExpression and FilterExpression because they have subexpressions that are evaluated in a different context from the calling expression.

  Overrides:
    `addToPathMap` in class `Expression`
  Parameters:
    `pathMap` - the PathMap to which the expression should be added
    `pathMapNodeSet` - the PathMapNodeSet to which the paths embodied in this expression should be added
  Returns:
    the pathMapNodeSet representing the points in the source document that are both reachable by this expression, and that represent possible results of this expression. For an expression that does navigation, it represents the end of the arc in the path map that describes the navigation route. For other expressions, it is the same as the input pathMapNode.

### evaluateItem

    public Item evaluateItem(XPathContext context)
                      throws XPathException

  Description copied from class: `Expression`
  Evaluate an expression as a single item. This always returns either a single Item or null (denoting the empty sequence). No conversion is done. This method should not be used unless the static type of the expression is a subtype of "item" or "item?": that is, it should not be called if the expression may return a sequence. There is no guarantee that this condition will be detected.

  Overrides:
    `evaluateItem` in class `Expression`
  Parameters:
    `context` - 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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.