Debian Codegraph @

net/sf/saxon/expr/VariableReference.java

raw symbols SCIP
1 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 // Copyright (c) 2018 Saxonica Limited.
3 // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
4 // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.
6 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
7
8 package net.sf.saxon.expr;
9
10 import com.saxonica.ee.stream.Streamability;
11 import net.sf.saxon.event.Receiver;
12 import net.sf.saxon.event.ReceiverOptions;
13 import net.sf.saxon.expr.flwor.LocalVariableBinding;
14 import net.sf.saxon.expr.instruct.GlobalParam;
15 import net.sf.saxon.expr.instruct.LocalParam;
16 import net.sf.saxon.expr.instruct.LocalParamBlock;
17 import net.sf.saxon.expr.parser.*;
18 import net.sf.saxon.lib.StandardErrorListener;
19 import net.sf.saxon.om.*;
20 import net.sf.saxon.pattern.NodeTest;
21 import net.sf.saxon.trace.ExpressionPresenter;
22 import net.sf.saxon.trans.XPathException;
23 import net.sf.saxon.type.*;
24 import net.sf.saxon.value.Cardinality;
25 import net.sf.saxon.value.IntegerValue;
26 import net.sf.saxon.value.SequenceType;
27
28 /**
29 * Variable reference: a reference to a variable. This may be an XSLT-defined variable, a range
30 * variable defined within the XPath expression, or a variable defined in some other static context.
31 */
32
33 public abstract class VariableReference extends Expression implements BindingReference {
34
35 /*@Nullable*/ protected Binding binding = null; // This will be null until fixup() is called; it will also be null
36 // if the variable reference has been inlined
37 protected SequenceType staticType = null;
38 protected GroundedValue<?> constantValue = null;
39 private StructuredQName variableName = null;
40 private boolean flattened = false;
41 private boolean inLoop = false;
42 private boolean filtered = false;
43
44 /**
45 * Create a Variable Reference
46 */
47
48 public VariableReference(StructuredQName name) {
49 variableName = name;
50 }
51
52 /**
53 * Create a Variable Reference
54 *
55 * @param binding the variable binding to which this variable refers
56 */
57
58 public VariableReference(Binding binding) {
59 //System.err.println("Creating varRef1");
60 variableName = binding.getVariableQName();
61 fixup(binding);
62 }
63
64 /**
65 * Set the variable name
66 *
67 * @param name the name of the variable
68 */
69
70 public void setVariableName(StructuredQName name) {
71 variableName = name;
72 }
73
74 /**
75 * Get the variable name
76 *
77 * @return the name of the variable
78 */
79
80 public StructuredQName getVariableName() {
81 return variableName;
82 }
83
84 /**
85 * Create a clone copy of this VariableReference
86 *
87 * @return the cloned copy
88 * @param rebindings variables that need to switch to new bindings
89 */
90
91 /*@NotNull*/
92 public abstract Expression copy(RebindingMap rebindings);
93
94
95 @Override
96 public int getNetCost() {
97 return 0;
98 }
99
100 protected void copyFrom(VariableReference ref) {
101 binding = ref.binding;
102 staticType = ref.staticType;
103 constantValue = ref.constantValue;
104 variableName = ref.variableName;
105 flattened = ref.flattened;
106 inLoop = ref.inLoop;
107 filtered = ref.filtered;
108 //#ifdefined STREAM
109 Streamability.setPostureAndSweep(this, Streamability.getPostureAndSweepIfKnown(ref));
110 //#endif
111 ExpressionTool.copyLocationInfo(ref, this);
112 }
113
114 /**
115 * Set static type. This is a callback from the variable declaration object. As well
116 * as supplying the static type, it may also supply a compile-time value for the variable.
117 * As well as the type information, other static properties of the value are supplied:
118 * for example, whether the value is an ordered node-set.
119 * @param type the static type of the variable
120 * @param value the value of the variable if this is a compile-time constant, or null otherwise
121 * @param properties static properties of the expression to which the variable is bound
122 */
123
124 public void setStaticType(SequenceType type, GroundedValue<?> value, int properties) {
125 // System.err.println(this + " Set static type = " + type);
126 if (type == null) {
127 type = SequenceType.ANY_SEQUENCE;
128 }
129 staticType = type;
130 constantValue = value;
131 // Although the variable may be a context document node-set at the point it is defined,
132 // the context at the point of use may be different, so this property cannot be transferred.
133 int dependencies = getDependencies();
134 staticProperties = (properties & ~StaticProperty.CONTEXT_DOCUMENT_NODESET
135 & ~StaticProperty.ALL_NODES_NEWLY_CREATED) |
136 StaticProperty.NO_NODES_NEWLY_CREATED |
137 type.getCardinality() |
138 dependencies;
139 }
140
141 /**
142 * Mark an expression as being "flattened". This is a collective term that includes extracting the
143 * string value or typed value, or operations such as simple value construction that concatenate text
144 * nodes before atomizing. The implication of all of these is that although the expression might
145 * return nodes, the identity of the nodes has no significance. This is called during type checking
146 * of the parent expression. At present, only variable references take any notice of this notification.
147 */
148
149 public void setFlattened(boolean flattened) {
150 this.flattened = flattened;
151 }
152
153 /**
154 * Test whether this variable reference is flattened - that is, whether it is atomized etc
155 *
156 * @return true if the value of the variable is atomized, or converted to a string or number
157 */
158
159 public boolean isFlattened() {
160 return flattened;
161 }
162
163 /**
164 * Mark an expression as filtered: that is, it appears as the base expression in a filter expression.
165 * This notification currently has no effect except when the expression is a variable reference.
166 */
167
168 public void setFiltered(boolean filtered) {
169 this.filtered = filtered;
170 }
171
172 /**
173 * Determine whether this variable reference is filtered
174 *
175 * @return true if the value of the variable is filtered by a predicate
176 */
177
178 public boolean isFiltered() {
179 return filtered;
180 }
181
182 /**
183 * Ask whether this variable reference appears in a loop relative to its declaration.
184 * By default, when in doubt, returns true. This is calculated during type-checking.
185 *
186 * @return true if this variable reference occurs in a loop, where the variable declaration is
187 * outside the loop
188 */
189
190 public boolean isInLoop() {
191 return inLoop;
192 }
193
194 /**
195 * Say whether this variable reference appears in a loop relative to its declaration.
196 *
197 * @param inLoop true if this variable reference occurs in a loop, where the variable declaration is
198 * outside the loop
199 */
200
201 public void setInLoop(boolean inLoop) {
202 this.inLoop = inLoop;
203 }
204
205 /**
206 * Type-check the expression. At this stage details of the static type must be known.
207 * If the variable has a compile-time value, this is substituted for the variable reference
208 */
209
210 /*@NotNull*/
211 public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException {
212 if (constantValue != null) {
213 binding = null;
214 return Literal.makeLiteral(constantValue, this);
215 }
216 // if (staticType == null) {
217 // throw new IllegalStateException("Variable $" + getDisplayName() + " has not been fixed up");
218 // }
219
220
221
222 // following code removed because it causes error181 to blow the stack - need to check for circularities well
223 // if (binding instanceof GlobalVariable) {
224 // ((GlobalVariable)binding).typeCheck(visitor, AnyItemType.getInstance());
225 // }
226
227 if (binding != null) {
228 recomputeInLoop();
229 binding.addReference(this, inLoop);
230 }
231
232 return this;
233 }
234
235 public void recomputeInLoop() {
236 inLoop = ExpressionTool.isLoopingReference(this, binding);
237 }
238
239 /**
240 * Optimize the expression. At this stage details of the static type must be known.
241 * If the variable has a compile-time value, this is substituted for the variable reference
242 */
243
244 /*@NotNull*/
245 public Expression optimize(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException {
246 if (binding instanceof LetExpression &&
247 ((LetExpression)binding).getSequence() instanceof Literal &&
248 !((LetExpression) binding).isIndexedVariable) {
249 Expression val = ((LetExpression) binding).getSequence();
250 Optimizer.trace(visitor.getConfiguration(), "Replaced variable " + getDisplayName() + " by its value", val);
251 binding = null;
252 return val.copy(new RebindingMap());
253 }
254 if (constantValue != null) {
255 binding = null;
256 Expression result = Literal.makeLiteral(constantValue, this);
257 ExpressionTool.copyLocationInfo(this, result);
258 Optimizer.trace(visitor.getConfiguration(), "Replaced variable " + getDisplayName() + " by its value", result);
259 return result;
260 }
261 if (binding instanceof GlobalParam && ((GlobalParam)binding).isStatic()) {
262 Expression select = ((GlobalParam)binding).getSelectExpression();
263 if (select instanceof Literal) {
264 binding = null;
265 Optimizer.trace(visitor.getConfiguration(), "Replaced static parameter " + getDisplayName() + " by its value", select);
266 return select;
267 }
268 }
269 return this;
270 }
271
272
273 /**
274 * Fix up this variable reference to a Binding object, which enables the value of the variable
275 * to be located at run-time.
276 */
277
278 public void fixup(Binding newBinding) {
279 boolean indexed = binding instanceof LocalBinding && ((LocalBinding)binding).isIndexedVariable();
280 this.binding = newBinding;
281 if (indexed && newBinding instanceof LocalBinding) {
282 ((LocalBinding)newBinding).setIndexedVariable();
283 }
284 resetLocalStaticProperties();
285 }
286
287 /**
288 * Provide additional information about the type of the variable, typically derived by analyzing
289 * the initializer of the variable binding
290 *
291 * @param type the item type of the variable
292 * @param cardinality the cardinality of the variable
293 * @param constantValue the actual value of the variable, if this is known statically, otherwise null
294 * @param properties additional static properties of the variable's initializer
295 */
296
297 public void refineVariableType(ItemType type, int cardinality, GroundedValue<?> constantValue, int properties) {
298 TypeHierarchy th = getConfiguration().getTypeHierarchy();
299 ItemType oldItemType = getItemType();
300 ItemType newItemType = oldItemType;
301 if (th.isSubType(type, oldItemType)) {
302 newItemType = type;
303 }
304 if (oldItemType instanceof NodeTest && type instanceof AtomicType) {
305 // happens when all references are flattened
306 newItemType = type;
307 }
308 int newcard = cardinality & getCardinality();
309 if (newcard == 0) {
310 // this will probably lead to a type error later
311 newcard = getCardinality();
312 }
313 SequenceType seqType = SequenceType.makeSequenceType(newItemType, newcard);
314 setStaticType(seqType, constantValue, properties);
315 }
316
317 /**
318 * Determine the data type of the expression, if possible
319 *
320 * @return the type of the variable, if this can be determined statically;
321 * otherwise Type.ITEM (meaning not known in advance)
322 */
323
324 /*@NotNull*/
325 public ItemType getItemType() {
326 if (staticType == null || staticType.getPrimaryType() == AnyItemType.getInstance()) {
327 if (binding != null) {
328 SequenceType st = binding.getRequiredType();
329 if (st != null) {
330 return st.getPrimaryType();
331 }
332 }
333 return AnyItemType.getInstance();
334 } else {
335 return staticType.getPrimaryType();
336 }
337 }
338
339 /**
340 * Get the static type of the expression as a UType, following precisely the type
341 * inference rules defined in the XSLT 3.0 specification.
342 *
343 * @return the static item type of the expression according to the XSLT 3.0 defined rules
344 * @param contextItemType the static context item type
345 */
346 @Override
347 public UType getStaticUType(UType contextItemType) {
348 if (binding != null) {
349 if (binding.isGlobal() ||
350 binding instanceof LocalParam ||
351 (binding instanceof LetExpression && ((LetExpression)binding).isInstruction()) ||
352 binding instanceof LocalVariableBinding) {
353 SequenceType st = binding.getRequiredType();
354 if (st != null) {
355 return st.getPrimaryType().getUType();
356 } else {
357 return UType.ANY;
358 }
359 } else if (binding instanceof Assignation) {
360 return ((Assignation) binding).getSequence().getStaticUType(contextItemType);
361 }
362 }
363 return UType.ANY;
364 }
365
366 /**
367 * For an expression that returns an integer or a sequence of integers, get
368 * a lower and upper bound on the values of the integers that may be returned, from
369 * static analysis. The default implementation returns null, meaning "unknown" or
370 * "not applicable". Other implementations return an array of two IntegerValue objects,
371 * representing the lower and upper bounds respectively. The values
372 * UNBOUNDED_LOWER and UNBOUNDED_UPPER are used by convention to indicate that
373 * the value may be arbitrarily large. The values MAX_STRING_LENGTH and MAX_SEQUENCE_LENGTH
374 * are used to indicate values limited by the size of a string or the size of a sequence.
375 *
376 * @return the lower and upper bounds of integer values in the result, or null to indicate
377 * unknown or not applicable.
378 */
379 @Override
380 public IntegerValue[] getIntegerBounds() {
381 if (binding != null) {
382 return binding.getIntegerBoundsForVariable();
383 } else {
384 return null;
385 }
386 }
387
388 /**
389 * Get the static cardinality
390 */
391
392 public int computeCardinality() {
393 if (staticType == null) {
394 if (binding == null) {
395 return StaticProperty.ALLOWS_ZERO_OR_MORE;
396 } else if (binding instanceof LetExpression) {
397 return binding.getRequiredType().getCardinality();
398 } else if (binding instanceof Assignation) {
399 return StaticProperty.EXACTLY_ONE;
400 } else if (binding.getRequiredType() == null) {
401 return StaticProperty.ALLOWS_ZERO_OR_MORE;
402 } else {
403 return binding.getRequiredType().getCardinality();
404 }
405 } else {
406 return staticType.getCardinality();
407 }
408 }
409
410 /**
411 * Determine the special properties of this expression
412 *
413 * @return {@link StaticProperty#NO_NODES_NEWLY_CREATED} (unless the variable is assignable using saxon:assign)
414 */
415
416 public int computeSpecialProperties() {
417 int p = super.computeSpecialProperties();
418 if (binding == null || !binding.isAssignable()) {
419 // if the variable reference is assignable, we mustn't move it, or any expression that contains it,
420 // out of a loop. The way to achieve this is to treat it as a "creative" expression, because the
421 // optimizer recognizes such expressions and handles them with care...
422 p |= StaticProperty.NO_NODES_NEWLY_CREATED;
423 }
424 if (binding instanceof Assignation) {
425 Expression exp = ((Assignation) binding).getSequence();
426 if (exp != null) {
427 p |= exp.getSpecialProperties() & StaticProperty.NOT_UNTYPED_ATOMIC;
428 }
429 }
430 if (staticType != null &&
431 !Cardinality.allowsMany(staticType.getCardinality()) &&
432 staticType.getPrimaryType() instanceof NodeTest) {
433 p |= StaticProperty.SINGLE_DOCUMENT_NODESET;
434 }
435 return p &~ StaticProperty.ALL_NODES_NEWLY_CREATED;
436 }
437
438 /**
439 * Test if this expression is the same as another expression.
440 * (Note, we only compare expressions that
441 * have the same static and dynamic context).
442 */
443
444 public boolean equals(Object other) {
445 return other instanceof VariableReference &&
446 binding == ((VariableReference) other).binding &&
447 binding != null;
448 }
449
450 /**
451 * get HashCode for comparing two expressions
452 */
453
454 public int computeHashCode() {
455 return binding == null ? 73619830 : binding.hashCode();
456 }
457
458
459 public int getIntrinsicDependencies() {
460 int d = 0;
461 if (binding == null) {
462 // assume the worst
463 d |= StaticProperty.DEPENDS_ON_LOCAL_VARIABLES |
464 StaticProperty.DEPENDS_ON_ASSIGNABLE_GLOBALS |
465 StaticProperty.DEPENDS_ON_RUNTIME_ENVIRONMENT;
466 } else if (binding.isGlobal()) {
467 if (binding.isAssignable()) {
468 d |= StaticProperty.DEPENDS_ON_ASSIGNABLE_GLOBALS;
469 }
470 if (binding instanceof GlobalParam) {
471 d |= StaticProperty.DEPENDS_ON_RUNTIME_ENVIRONMENT;
472 }
473 } else {
474 d |= StaticProperty.DEPENDS_ON_LOCAL_VARIABLES;
475 }
476 return d;
477 }
478
479 /**
480 * An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
481 * This method indicates which of these methods is provided. This implementation provides both all three methods
482 * natively.
483 */
484
485 public int getImplementationMethod() {
486 return (Cardinality.allowsMany(getCardinality()) ? 0 : EVALUATE_METHOD)
487 | ITERATE_METHOD | PROCESS_METHOD;
488 }
489
490 /**
491 * Get the innermost scoping expression of this expression, for expressions that directly
492 * depend on something in the dynamic context. For example, in the case of a local variable
493 * reference this is the expression that causes the relevant variable to be bound; for a
494 * context item expression it is the innermost focus-setting container. For expressions
495 * that have no intrinsic dependency on the dynamic context, the value returned is null;
496 * the scoping container for such an expression is the innermost scoping container of its
497 * operands.
498 *
499 * @return the innermost scoping container of this expression
500 */
501 @Override
502 public Expression getScopingExpression() {
503 if (binding instanceof Expression) {
504 if (binding instanceof LocalParam && ((LocalParam)binding).getParentExpression() instanceof LocalParamBlock) {
505 LocalParamBlock block = (LocalParamBlock)((LocalParam) binding).getParentExpression();
506 return block.getParentExpression();
507 } else {
508 return (Expression) binding;
509 }
510 }
511 Expression parent = getParentExpression();
512 while (parent != null) {
513 if (parent.hasVariableBinding(binding)) {
514 return parent;
515 }
516 parent = parent.getParentExpression();
517 }
518 return null;
519 }
520
521 /**
522 * Add a representation of this expression to a PathMap. The PathMap captures a map of the nodes visited
523 * by an expression in a source tree.
524 * <p>The default implementation of this method assumes that an expression does no navigation other than
525 * the navigation done by evaluating its subexpressions, and that the subexpressions are evaluated in the
526 * same context as the containing expression. The method must be overridden for any expression
527 * where these assumptions do not hold. For example, implementations exist for AxisExpression, ParentExpression,
528 * and RootExpression (because they perform navigation), and for the doc(), document(), and collection()
529 * functions because they create a new navigation root. Implementations also exist for PathExpression and
530 * FilterExpression because they have subexpressions that are evaluated in a different context from the
531 * calling expression.</p>
532 *
533 * @param pathMap the PathMap to which the expression should be added
534 * @param pathMapNodeSet the PathMapNodeSet to which the paths embodied in this expression should be added
535 * @return the pathMapNodeSet representing the points in the source document that are both reachable by this
536 * expression, and that represent possible results of this expression. For an expression that does
537 * navigation, it represents the end of the arc in the path map that describes the navigation route. For other
538 * expressions, it is the same as the input pathMapNode.
539 */
540
541 public PathMap.PathMapNodeSet addToPathMap(PathMap pathMap, PathMap.PathMapNodeSet pathMapNodeSet) {
542 return pathMap.getPathForVariable(getBinding());
543 }
544
545 /**
546 * Get the value of this variable in a given context.
547 *
548 * @param c the XPathContext which contains the relevant variable bindings
549 * @return the value of the variable, if it is defined
550 * @throws XPathException if the variable is undefined
551 */
552
553 /*@NotNull*/
554 public SequenceIterator<?> iterate(XPathContext c) throws XPathException {
555 try {
556 Sequence<?> actual = evaluateVariable(c);
557 assert actual != null;
558 return actual.iterate();
559 } catch (XPathException err) {
560 err.maybeSetLocation(getLocation());
561 throw err;
562 } catch (NullPointerException err) {
563 err.printStackTrace();
564 String msg = "Internal error: no value for variable $" + getDisplayName() +
565 " at line " + getLocation().getLineNumber() + (getLocation().getSystemId() == null ? "" : " of " + getLocation().getSystemId());
566 StandardErrorListener.printStackTrace(c, c.getConfiguration().getLogger(), 2);
567 throw new AssertionError(msg);
568 } catch (AssertionError err) {
569 err.printStackTrace();
570 String msg = err.getMessage() + ". Variable reference $" + getDisplayName() +
571 " at line " + getLocation().getLineNumber() + (getLocation().getSystemId() == null ? "" : " of " + getLocation().getSystemId());
572 StandardErrorListener.printStackTrace(c, c.getConfiguration().getLogger(), 2);
573 throw new AssertionError(msg);
574 }
575 }
576
577 public Item evaluateItem(XPathContext c) throws XPathException {
578 try {
579 Sequence<?> actual = evaluateVariable(c);
580 assert actual != null;
581 return actual.head();
582 } catch (XPathException err) {
583 err.maybeSetLocation(getLocation());
584 throw err;
585 }
586 }
587
588 public void process(XPathContext c) throws XPathException {
589 try {
590 SequenceIterator<?> iter = evaluateVariable(c).iterate();
591 Receiver out = c.getReceiver();
592 Location loc = getLocation();
593 iter.forEachOrFail(item -> out.append(item, loc, ReceiverOptions.ALL_NAMESPACES));
594 } catch (XPathException err) {
595 err.maybeSetLocation(getLocation());
596 throw err;
597 }
598 }
599
600 /**
601 * Evaluate this variable
602 *
603 * @param c the XPath dynamic context
604 * @return the value of the variable
605 * @throws XPathException if any error occurs
606 */
607
608 /*@NotNull*/
609 public Sequence<?> evaluateVariable(XPathContext c) throws XPathException {
610 try {
611 return binding.evaluateVariable(c);
612 } catch (NullPointerException err) {
613 if (binding == null) {
614 throw new IllegalStateException("Variable $" + variableName.getDisplayName() + " has not been fixed up");
615 } else {
616 throw err;
617 }
618 }
619 }
620
621 /**
622 * Get the object bound to the variable
623 *
624 * @return the Binding which declares this variable and associates it with a value
625 */
626
627 public Binding getBinding() {
628 return binding;
629 }
630
631 /**
632 * Get the display name of the variable. This is taken from the variable binding if possible
633 *
634 * @return the display name (a lexical QName
635 */
636
637 public String getDisplayName() {
638 if (binding != null) {
639 return binding.getVariableQName().getDisplayName();
640 } else {
641 return variableName.getDisplayName();
642 }
643 }
644
645 /**
646 * Get the EQName of the variable. This is taken from the variable binding if possible.
647 * The returned name is in the format Q{uri}local if in a namespace, or the local name
648 * alone if not.
649 *
650 * @return the EQName, or the local name if not in a namespace
651 */
652
653 public String getEQName() {
654 if (binding != null) {
655 StructuredQName q = binding.getVariableQName();
656 if (q.hasURI("")) {
657 return q.getLocalPart();
658 } else {
659 return q.getEQName();
660 }
661 } else {
662 return variableName.getEQName();
663 }
664 }
665
666 /**
667 * The toString() method for an expression attempts to give a representation of the expression
668 * in an XPath-like form, but there is no guarantee that the syntax will actually be true XPath.
669 * In the case of XSLT instructions, the toString() method gives an abstracted view of the syntax
670 */
671
672 public String toString() {
673 String d = getEQName();
674 return "$" + (d == null ? "$" : d);
675 }
676
677 /**
678 * Produce a short string identifying the expression for use in error messages
679 *
680 * @return a short string, sufficient to identify the expression
681 */
682
683 @Override
684 public String toShortString() {
685 return "$" + getDisplayName();
686 }
687
688 /**
689 * Get a name identifying the kind of expression, in terms meaningful to a user.
690 *
691 * @return a name identifying the kind of expression, in terms meaningful to a user.
692 * The name will always be in the form of a lexical XML QName, and should match the name used
693 * in export() output displaying the expression.
694 */
695 @Override
696 public String getExpressionName() {
697 return "varRef";
698 }
699
700 /**
701 * Diagnostic print of expression structure. The abstract expression tree
702 * is written to the supplied output destination.
703 */
704
705 public void export(ExpressionPresenter destination) throws XPathException {
706 destination.startElement("varRef", this);
707 destination.emitAttribute("name", variableName);
708 if (binding instanceof LocalBinding) {
709 destination.emitAttribute("slot", "" + ((LocalBinding) binding).getLocalSlotNumber());
710 }
711
712 destination.endElement();
713 }
714
715 /**
716 * Get the (partial) name of a class that supports streaming of this kind of expression
717 *
718 * @return the partial name of a class that can be instantiated to provide streaming support in Saxon-EE,
719 * or null if there is no such class
720 */
721 @Override
722 public String getStreamerName() {
723 return "VariableReference";
724 }
725 }
726