Debian Codegraph @

net/sf/saxon/style/Compilation.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.style;
9
10 import net.sf.saxon.Configuration;
11 import net.sf.saxon.PreparedStylesheet;
12 import net.sf.saxon.expr.PackageData;
13 import net.sf.saxon.expr.instruct.GlobalParameterSet;
14 import net.sf.saxon.om.*;
15 import net.sf.saxon.pattern.NodeKindTest;
16 import net.sf.saxon.trans.CompilerInfo;
17 import net.sf.saxon.trans.XPathException;
18 import net.sf.saxon.trans.packages.PackageDetails;
19 import net.sf.saxon.trans.packages.PackageLibrary;
20 import net.sf.saxon.trans.packages.UsePack;
21 import net.sf.saxon.trans.packages.VersionedPackageName;
22 import net.sf.saxon.tree.util.FastStringBuffer;
23 import net.sf.saxon.type.Type;
24 import net.sf.saxon.value.AtomicValue;
25 import net.sf.saxon.value.NestedIntegerValue;
26
27 import javax.xml.transform.ErrorListener;
28 import javax.xml.transform.Source;
29 import javax.xml.transform.TransformerException;
30 import java.util.*;
31
32 /**
33 * Represents an XSLT compilation episode, compiling a single package.
34 */
35 public class Compilation {
36
37 // diagnostic switch to control output of timing information
38 public final static boolean TIMING = false;
39 private Configuration config;
40 private CompilerInfo compilerInfo;
41 private PrincipalStylesheetModule principalStylesheetModule;
42 private int errorCount = 0;
43 private boolean schemaAware;
44 private QNameParser qNameParser;
45 private Map<StructuredQName, ValueAndPrecedence> staticVariables = new HashMap<>();
46 private Map<DocumentURI, TreeInfo> stylesheetModules = new HashMap<>();
47 private Stack<DocumentURI> importStack = new Stack<>(); // handles both include and import
48 private PackageData packageData;
49 private boolean preScan = true;
50 private boolean createsSecondaryResultDocuments = false;
51 private boolean libraryPackage = false;
52 private VersionedPackageName expectedNameAndVersion = null;
53 private List<UsePack> packageDependencies = new ArrayList<>();
54 private List<VersionedPackageName> usingPackages = new ArrayList<>();
55 private GlobalParameterSet suppliedParameters;
56 private boolean fallbackToNonStreaming = false;
57
58 private static class ValueAndPrecedence {
59 public ValueAndPrecedence(GroundedValue v, NestedIntegerValue p, boolean isParam) {
60 this.value = v;
61 this.precedence = p;
62 this.isParam = isParam;
63 }
64
65 public GroundedValue value;
66 public NestedIntegerValue precedence;
67 public boolean isParam;
68 }
69
70 /**
71 * Create a compilation object ready to perform an XSLT compilation
72 *
73 * @param config the Saxon Configuration
74 * @param info compilation options
75 */
76
77 public Compilation(Configuration config, CompilerInfo info) {
78 this.config = config;
79 this.compilerInfo = info;
80 schemaAware = info.isSchemaAware();
81 preScan = info.isJustInTimeCompilation();
82 suppliedParameters = compilerInfo.getParameters();
83
84 qNameParser = new QNameParser(null);
85 qNameParser.setAcceptEQName(true);
86 qNameParser.setDefaultNamespace("");
87 qNameParser.setErrorOnBadSyntax("XTSE0020");
88 qNameParser.setErrorOnUnresolvedPrefix("XTSE0280");
89 }
90
91 /**
92 * Static factory method: Compile an XSLT stylesheet consisting of a single package
93 *
94 * @param config the Saxon Configuration
95 * @param compilerInfo the compilation options
96 * @param source the source of the root stylesheet module in the package to be compiled. This may
97 * contain an xsl:package element at its root, or it may be a conventional xsl:stylesheet or xsl:transform,
98 * or a "simplified stylesheet" rooted at a literal result element
99 * @return the PreparedStylesheet representing the result of the compilation
100 * @throws XPathException if any errors occur. The errors will have been reported to the ErrorListener
101 * contained in the CompilerInfo.
102 */
103
104 public static PreparedStylesheet compileSingletonPackage(Configuration config, CompilerInfo compilerInfo, Source source) throws XPathException {
105 try {
106 Compilation compilation = new Compilation(config, compilerInfo);
107 return StylesheetModule.loadStylesheet(source, compilation);
108
109 } catch (XPathException err) {
110 if (!err.hasBeenReported()) {
111 try {
112 compilerInfo.getErrorListener().fatalError(err);
113 } catch (TransformerException e2) {
114 // ignore error
115 }
116 }
117 throw err;
118 }
119 }
120
121 /**
122 * Supply the name/version of the package that invoked this compilation by virtue of an xsl:use-package
123 * declaration, together with the users of that package, recursively. The package is not allowed to
124 * use the packages in this list, because that would create a cycle of dependencies
125 * @param users the packages that directly or indirectly use this package.
126 */
127
128 public void setUsingPackages(List<VersionedPackageName> users) {
129 this.usingPackages = users;
130 }
131
132 public void setPackageData(PackageData pack) {
133 this.packageData = pack;
134 }
135
136 public void setMinimalPackageData() {
137 if (getPackageData() == null) {
138 // Create a temporary PackageData for use during use-when processing
139 PackageData pd = new PackageData(getConfiguration());
140 pd.setHostLanguage(Configuration.XSLT);
141 pd.setTargetEdition(compilerInfo.getTargetEdition());
142 pd.setSchemaAware(schemaAware);
143 packageData = pd;
144 }
145 }
146
147 public void setExpectedNameAndVersion(VersionedPackageName vpn) {
148 this.expectedNameAndVersion = vpn;
149 }
150
151 /**
152 * Method called internally while compiling a package to register that an xsl:use-package declaration has been encountered.
153 * @param use details of the package dependency (name and version of the dependee package)
154 */
155
156 public void registerPackageDependency(UsePack use) {
157 packageDependencies.add(use);
158 }
159
160 /**
161 * After the first phase of processing, we have gathered information about the xsl:use-package elements in the stylesheet.
162 * We now ensure that these dependencies are satisfied and are bound to actual loaded packages, invoking the compiler
163 * recursively to load the package if necessary. If there are cyclic references, these must be detected.
164 */
165
166 public void satisfyPackageDependencies(XSLPackage thisPackage) throws XPathException {
167
168 // if (expectedNameAndVersion != null && !thisPackage.getNameAndVersion().equalsIgnoringSuffix(expectedNameAndVersion)) {
169 // throw new XPathException("Name and version of package in XSLT source [" + thisPackage.getNameAndVersion() +
170 // "] do not match name and version in configuration file [" + expectedNameAndVersion + "]");
171 // }
172 PackageLibrary library = compilerInfo.getPackageLibrary();
173 XPathException lastError = null;
174
175 for (UsePack use : packageDependencies) {
176 PackageDetails details = library.findPackage(use.packageName, use.ranges);
177 if (details == null) {
178 throw new XPathException("Cannot find package " + use.packageName + " (version " + use.ranges + ")",
179 "XTSE3000", use.location);
180 }
181 if (details.loadedPackage != null) {
182 StylesheetPackage used = details.loadedPackage;
183 VersionedPackageName existing =
184 new VersionedPackageName(used.getPackageName(), used.getPackageVersion());
185 if (usingPackages.contains(existing)) {
186 // Report a cycle of package dependencies
187 FastStringBuffer buffer = new FastStringBuffer(1024);
188 for (VersionedPackageName n : usingPackages) {
189 buffer.append(n.packageName);
190 buffer.append(", ");
191 }
192 buffer.append("and ");
193 buffer.append(thisPackage.getName());
194 throw new XPathException("There is a cycle of package dependencies involving " + buffer, "XTSE3005");
195 }
196 }
197 StylesheetPackage used;
198 try {
199 List<VersionedPackageName> disallowed = new ArrayList<>(usingPackages);
200 disallowed.add(details.nameAndVersion);
201 used = library.obtainLoadedPackage(details, disallowed);
202 } catch (XPathException err) {
203 if (!err.hasBeenReported()) {
204 reportError(err);
205 }
206 lastError = err;
207 }
208
209 }
210 if (lastError != null) {
211 throw lastError;
212 }
213 }
214
215 /**
216 * Compile a stylesheet package
217 *
218 * @param source the XML document containing the top-level stylesheet module in the package,
219 * which may be an xsl:package element, an xsl:stylesheet or xsl:transform element, or a
220 * "simplified stylesheet" rooted at a literal result element
221 * @return the StylesheetPackage representing the result of the compilation
222 * @throws XPathException if any error occurs while compiling the package
223 */
224
225 public PrincipalStylesheetModule compilePackage(Source source) throws XPathException {
226 setMinimalPackageData();
227 NodeInfo document;
228 NodeInfo outermost = null;
229 if (source instanceof NodeInfo) {
230 NodeInfo root = (NodeInfo)source;
231 if (root.getNodeKind() == Type.DOCUMENT) {
232 document = root;
233 outermost = document.iterateAxis(AxisInfo.CHILD, NodeKindTest.ELEMENT).next();
234 } else if (root.getNodeKind() == Type.ELEMENT) {
235 document = root.getRoot();
236 outermost = root;
237 }
238 }
239 if (!(outermost instanceof XSLPackage)) {
240 document = StylesheetModule.loadStylesheetModule(source, true, this, NestedIntegerValue.TWO);
241 outermost = document.iterateAxis(AxisInfo.CHILD, NodeKindTest.ELEMENT).next();
242 }
243
244 if (outermost instanceof LiteralResultElement) {
245 document = ((LiteralResultElement) outermost).makeStylesheet(true);
246 outermost = document.iterateAxis(AxisInfo.CHILD, NodeKindTest.ELEMENT).next();
247 }
248
249 XSLPackage xslpackage;
250 try {
251 if (outermost instanceof XSLPackage) {
252 xslpackage = (XSLPackage) outermost;
253 } else {
254 throw new XPathException("Outermost element must be xsl:package, xsl:stylesheet, or xsl:transform");
255 }
256 } catch (XPathException e) {
257 if (!e.hasBeenReported()) {
258 try {
259 getCompilerInfo().getErrorListener().fatalError(e);
260 } catch (TransformerException e1) {
261 // ignore secondary error
262 }
263 }
264 throw e;
265 }
266 CompilerInfo info = getCompilerInfo();
267 StyleNodeFactory factory = getStyleNodeFactory(true);
268 PrincipalStylesheetModule psm = factory.newPrincipalModule(xslpackage);
269 StylesheetPackage pack = psm.getStylesheetPackage();
270 pack.setVersion(xslpackage.getVersion());
271 pack.setPackageVersion(xslpackage.getPackageVersion());
272 pack.setPackageName(xslpackage.getName());
273 pack.setSchemaAware(info.isSchemaAware() || isSchemaAware());
274 pack.createFunctionLibrary();
275 if (info.getExtensionFunctionLibrary() != null) {
276 pack.getFunctionLibrary().addFunctionLibrary(info.getExtensionFunctionLibrary());
277 }
278 psm.getRuleManager().setRecoveryPolicy(info.getRecoveryPolicy());
279 psm.getRuleManager().setCompilerInfo(info);
280 setPrincipalStylesheetModule(psm);
281 packageData = null;
282
283 satisfyPackageDependencies(xslpackage);
284
285 try {
286 psm.preprocess();
287 } catch (XPathException e) {
288 try {
289 info.getErrorListener().fatalError(e);
290 } catch (TransformerException e3) {
291 // ignore an error thrown by the ErrorListener
292 }
293 throw e;
294 }
295
296 if (getErrorCount() == 0) {
297 try {
298 psm.fixup();
299 } catch (XPathException e) {
300 reportError(e);
301 }
302 }
303
304 // Compile groups of like-named attribute sets into a single attributeSet object
305 if (getErrorCount() == 0) {
306 try {
307 psm.combineAttributeSets(this);
308 } catch (XPathException e) {
309 reportError(e);
310 }
311 }
312
313
314 // Adjust visibility of components based on xsl:expose
315 // if (getErrorCount() == 0) {
316 // try {
317 // psm.adjustExposedVisibility();
318 // } catch (XPathException e) {
319 // reportError(e);
320 // }
321 // }
322
323 // Compile the stylesheet package
324 if (getErrorCount() == 0) {
325 try {
326 psm.compile(this);
327 } catch (XPathException e) {
328 reportError(e);
329 }
330 }
331
332 if (getErrorCount() == 0) {
333 try {
334 psm.complete();
335 } catch (XPathException e) {
336 reportError(e);
337 }
338 }
339
340 psm.getStylesheetPackage().setCreatesSecondaryResultDocuments(createsSecondaryResultDocuments);
341
342 if (isFallbackToNonStreaming()) {
343 psm.getStylesheetPackage().setFallbackToNonStreaming();
344 }
345 return psm;
346 }
347
348 /**
349 * Get the Saxon Configuration used by this Compilation
350 *
351 * @return the Saxon Configuration
352 */
353
354 public Configuration getConfiguration() {
355 return config;
356 }
357
358 /**
359 * Get the compilation options used by this compilation
360 *
361 * @return the compilation options
362 */
363
364 public CompilerInfo getCompilerInfo() {
365 return compilerInfo;
366 }
367
368 /**
369 * Get information about the package that was compiled in the course of this Compilation
370 *
371 * @return package information
372 */
373
374 public PackageData getPackageData() {
375 if (packageData != null) {
376 return packageData;
377 }
378 return principalStylesheetModule == null ? null : principalStylesheetModule.getStylesheetPackage();
379 }
380
381 /**
382 * Ask whether this compilation is schema-aware. It is schema-aware either if this is explicitly
383 * requested in the supplied CompilerInfo, or if this is explicitly requested within the stylesheet
384 * source code, for example by the presence of an <code>xsl:import-schema</code> declaration or a
385 * <code>validation</code> attribute
386 *
387 * @return true if the compilation is schema-aware
388 */
389
390 public boolean isSchemaAware() {
391 return schemaAware;
392 }
393
394 /**
395 * Say that this compilation is schema-aware. This method is called internally during the course
396 * of a compilation if an <code>xsl:import-schema</code> declaration is encountered.
397 *
398 * @param schemaAware true if the compilation is schema-aware.
399 */
400
401 public void setSchemaAware(boolean schemaAware) {
402 this.schemaAware = schemaAware;
403 getPackageData().setSchemaAware(schemaAware);
404 }
405
406 /**
407 * Get the StyleNodeFactory used to build the stylesheet tree
408 *
409 * @param topLevel true if the factory is for the top-level (package) module of a package
410 * @return the StyleNodeFactory
411 */
412
413 public StyleNodeFactory getStyleNodeFactory(boolean topLevel) {
414 StyleNodeFactory factory = getConfiguration().makeStyleNodeFactory(this);
415 factory.setTopLevelModule(topLevel);
416 return factory;
417 }
418
419 private void setPrincipalStylesheetModule(PrincipalStylesheetModule module) {
420 this.principalStylesheetModule = module;
421 }
422
423 /**
424 * Get the (most recent) stylesheet package compiled using this Compilation
425 *
426 * @return the most recent stylesheet package compiled
427 */
428
429 public PrincipalStylesheetModule getPrincipalStylesheetModule() {
430 return principalStylesheetModule;
431 }
432
433 /**
434 * Report a compile time error. This calls the errorListener to output details
435 * of the error, and increments an error count.
436 *
437 * @param err the exception containing details of the error
438 */
439
440 public void reportError(XPathException err) {
441 ErrorListener el = compilerInfo.getErrorListener();
442 if (el == null) {
443 el = getConfiguration().getErrorListener();
444 }
445 if (!err.hasBeenReported()) {
446 errorCount++;
447 try {
448 el.fatalError(err);
449 err.setHasBeenReported(true);
450 } catch (Exception err2) {
451 // ignore secondary error
452 }
453 } else if (errorCount == 0) {
454 errorCount++;
455 }
456 }
457
458 /**
459 * Get the number of errors reported so far
460 *
461 * @return the number of errors reported
462 */
463
464 public int getErrorCount() {
465 return errorCount;
466 }
467
468 /**
469 * Report a compile time warning. This calls the errorListener to output details
470 * of the warning.
471 *
472 * @param err an exception holding details of the warning condition to be
473 * reported
474 */
475
476 public void reportWarning(XPathException err) {
477 ErrorListener el = compilerInfo.getErrorListener();
478 if (el == null) {
479 el = getConfiguration().getErrorListener();
480 }
481 if (el != null) {
482 try {
483 el.warning(err);
484 } catch (Exception err2) {
485 // ignore secondary error
486 }
487 }
488 }
489
490 /**
491 * Declare a static variable. This is called internally by the stylesheet compiler when a static
492 * variable declaration is encountered.
493 *
494 * @param name the name of the variable
495 * @param value the value of the variable
496 * @param precedence the import precedence in the form of a "decimal" value (e.g. 2.14.6)
497 * @param isParam true if this is an xsl:param rather than an xsl:variable
498 * @throws XPathException if, for example, the value of the variable is incompatible with other
499 * variables having the same name
500 */
501
502 public void declareStaticVariable(StructuredQName name, GroundedValue value, NestedIntegerValue precedence, boolean isParam) throws XPathException {
503 ValueAndPrecedence vp = staticVariables.get(name);
504 if (vp != null) {
505 if (vp.precedence.compareTo(precedence) < 0) {
506 // new value must be compatible with the old, see spec bug 24478
507 if (!valuesAreCompatible(value, vp.value)) {
508 throw new XPathException("Incompatible values assigned for static variable " + name.getDisplayName(), "XTSE3450");
509 }
510 if (vp.isParam != isParam) {
511 throw new XPathException("Static variable " + name.getDisplayName() + " cannot be redeclared as a param", "XTSE3450");
512 }
513 } else {
514 return; // ignore the new value
515 }
516 }
517 staticVariables.put(name, new ValueAndPrecedence(value, precedence, isParam));
518 }
519
520 /**
521 * Test whether two values are the same in the sense of error XTSE3450
522 *
523 * @param val0 the first value
524 * @param val1 the second value
525 * @return true if the values are the same: if they are atomic values, they must be "identical";
526 * if they are nodes, they must be the same node.
527 */
528
529 private boolean valuesAreCompatible(GroundedValue val0, GroundedValue val1) {
530 if (val0.getLength() != val1.getLength()) {
531 return false;
532 }
533 if (val0.getLength() == 1) {
534 Item i0 = val0.head();
535 Item i1 = val1.head();
536 if (i0 instanceof AtomicValue) {
537 return i1 instanceof AtomicValue && ((AtomicValue) i0).isIdentical((AtomicValue) i1);
538 } else if (i0 instanceof NodeInfo) {
539 return i1 instanceof NodeInfo && i0.equals(i1);
540 } else {
541 return i0 == i1;
542 }
543 } else {
544 for (int i = 0; i < val0.getLength(); i++) {
545 if (!valuesAreCompatible(val0.itemAt(i), val1.itemAt(i))) {
546 return false;
547 }
548 }
549 return true;
550 }
551 }
552
553 /**
554 * Get the value of a static variable
555 *
556 * @param name the name of the required variable
557 * @return the value of the variable if there is one, or null if the variable is undeclared
558 */
559
560 public GroundedValue<?> getStaticVariable(StructuredQName name) {
561 ValueAndPrecedence vp = staticVariables.get(name);
562 return vp == null ? null : vp.value;
563 }
564
565 /**
566 * Get the precedence of a static variable
567 *
568 * @param name the name of the required variable
569 * @return the precedence of the variable if there is one, or null if the variable is undeclared
570 */
571
572 public NestedIntegerValue getStaticVariablePrecedence(StructuredQName name) {
573 ValueAndPrecedence vp = staticVariables.get(name);
574 return vp == null ? null : vp.precedence;
575 }
576
577 /**
578 * Get the map of stylesheet modules. This includes an entry for every stylesheet module
579 * in the compilation; the key is the absolute URI, and the value is the corresponding
580 * document.
581 *
582 * @return the map from absolute URIs to (documents containing) stylesheet modules
583 */
584
585 public Map<DocumentURI, TreeInfo> getStylesheetModules() {
586 return stylesheetModules;
587 }
588
589 /**
590 * Get the stack of include/imports, used to detect circularities
591 *
592 * @return the include/import stack
593 */
594
595 public Stack<DocumentURI> getImportStack() {
596 return importStack;
597 }
598
599 /**
600 * Get the QNameParser for parsing QNames in this compilation
601 * Note that the namespaceResolver will be unitialized
602 * @return the QNameParser
603 */
604
605 public QNameParser getQNameParser() {
606 return qNameParser;
607 }
608
609 /**
610 * Ask whether this is the compile-time phase of a just-in-time compilation, during which template
611 * rules are not fully processed
612 * @return true if just-in-time compilation is in force and this is the static processing phase
613 * in which code is not fully processed. Return false if just-in-time compilation is not in force,
614 * or if this is the run-time phase during which full static analysis and code generation takes place.
615 */
616
617 public boolean isPreScan() {
618 return preScan;
619 }
620
621 /**
622 * Say whether this is the compile-time phase of a just-in-time compilation, during which template
623 * rules are not fully processed
624 *
625 * @param preScan true if just-in-time compilation is in force and this is the static processing phase
626 * in which code is not fully processed. Set to false if just-in-time compilation is not in force,
627 * or if this is the run-time phase during which full static analysis and code generation takes place.
628 */
629
630 public void setPreScan(boolean preScan) {
631 this.preScan = preScan;
632 }
633
634 /**
635 * Ask whether the package has encountered an xsl:result-document instruction
636 *
637 * @return true if the package contains an xsl:result-document instruction
638 */
639
640 public boolean isCreatesSecondaryResultDocuments() {
641 return createsSecondaryResultDocuments;
642 }
643
644 /**
645 * Say whether the compilation has encountered an xsl:result-document instruction
646 *
647 * @param createsSecondaryResultDocuments true if the package contains an xsl:result-document instruction
648 */
649
650 public void setCreatesSecondaryResultDocuments(boolean createsSecondaryResultDocuments) {
651 this.createsSecondaryResultDocuments = createsSecondaryResultDocuments;
652 }
653
654 /**
655 * Ask whether the package being compiled is a library package
656 * @return true if this is a library package
657 */
658
659 public boolean isLibraryPackage() {
660 return libraryPackage;
661 }
662
663 /**
664 * Say whether the package being compiled is a library package
665 * @param libraryPackage if this is a library package
666 */
667
668 public void setLibraryPackage(boolean libraryPackage) {
669 this.libraryPackage = libraryPackage;
670 }
671
672 /**
673 * Set the value of a stylesheet parameter. Static (compile-time) parameters must be provided using
674 * this method on the XsltCompiler object, prior to stylesheet compilation. Non-static parameters
675 * may also be provided using this method if their values will not vary from one transformation
676 * to another. No error occurs at this stage if the parameter is unknown, or if the value is incorrect
677 * for the parameter. Setting a value for a parameter overwrites any previous value set for the
678 * same parameter.
679 *
680 * @param name the name of the stylesheet parameter
681 * @param seq the value of the stylesheet parameter
682 */
683
684 public void setParameter(StructuredQName name, GroundedValue<?> seq) {
685 suppliedParameters.put(name, seq);
686 }
687
688 /**
689 * Get the values of all stylesheet parameters that have been set using the
690 * {@link #setParameter(net.sf.saxon.om.StructuredQName, net.sf.saxon.om.GroundedValue)}
691 * method.
692 *
693 * @return the set of all parameters that have been set.
694 */
695
696 public GlobalParameterSet getParameters() {
697 return suppliedParameters;
698 }
699
700 /**
701 * Clear the values of all stylesheet parameters that have been set using the
702 * {@link #setParameter(net.sf.saxon.om.StructuredQName, net.sf.saxon.om.GroundedValue)}
703 * method; and decouple the parameters held by this Compilation from those defined
704 * in the originating CompilerInfo
705 */
706
707 public void clearParameters() {
708 suppliedParameters = new GlobalParameterSet();
709 }
710
711 /**
712 * Ask whether a non-streamable construct has been found, forcing the entire stylesheet
713 * to fall back to unstreamed processing
714 * @return true if the stylesheet must fall back to unstreamed processing
715 */
716
717 public boolean isFallbackToNonStreaming() {
718 return fallbackToNonStreaming;
719 }
720
721 /**
722 * This method is called when a non-streamable construct is found, and the configuration option
723 * {@link net.sf.saxon.lib.Feature#STREAMING_FALLBACK} has been set; the effect is to mark the whole
724 * stylesheet as non-streamable
725 * @param fallbackToNonStreaming true if a construct has been found that is declared streamable but
726 * not actually streamable, if fallback processing was requested.
727 */
728
729 public void setFallbackToNonStreaming(boolean fallbackToNonStreaming) {
730 this.fallbackToNonStreaming = fallbackToNonStreaming;
731 }
732
733
734 }