public class CompilerInfo
extends java.lang.Object
Constructor and Description |
---|
CompilerInfo(CompilerInfo info)
Create a CompilerInfo object as a copy of another CompilerInfo object
|
CompilerInfo(Configuration config)
Create an empty CompilerInfo object with default settings.
|
Modifier and Type | Method and Description |
---|---|
void |
clearParameters()
Clear the values of all stylesheet parameters that have been set using the
setParameter(net.sf.saxon.om.StructuredQName, net.sf.saxon.om.Sequence)
method. |
void |
copyFrom(CompilerInfo info)
Copy all properties from a supplied CompilerInfo
|
CodeInjector |
getCodeInjector()
Get the registered CodeInjector, if any
|
Configuration |
getConfiguration() |
java.lang.String |
getDefaultCollation()
Get the name of the default collation
|
StructuredQName |
getDefaultInitialMode()
Get the default initial mode name for a stylesheet compiled using this CompilerInfo.
|
StructuredQName |
getDefaultInitialTemplate()
Get the default initial template name for a stylesheet compiled using this CompilerInfo.
|
javax.xml.transform.ErrorListener |
getErrorListener()
Get the ErrorListener being used during this compilation episode
|
FunctionLibrary |
getExtensionFunctionLibrary()
Get any function library that was previously set using
setExtensionFunctionLibrary(net.sf.saxon.functions.FunctionLibrary) . |
java.lang.String |
getMessageReceiverClassName()
Get the name of the class that will be instantiated to create a MessageEmitter,
to process the output of xsl:message instructions in XSLT.
|
OutputURIResolver |
getOutputURIResolver()
Get the OutputURIResolver that will be used to resolve URIs used in the
href attribute of the xsl:result-document instruction.
|
PackageLibrary |
getPackageLibrary()
Get the package library to be used during the compilation episode.
|
GlobalParameterSet |
getParameters()
Get the values of all stylesheet parameters that have been set using the
setParameter(net.sf.saxon.om.StructuredQName, net.sf.saxon.om.Sequence)
method. |
java.util.Collection<QueryLibrary> |
getQueryLibraries() |
int |
getRecoveryPolicy()
Get the policy for handling recoverable errors.
|
java.lang.String |
getTargetEdition()
Get the target edition under which the stylesheet will be executed.
|
javax.xml.transform.URIResolver |
getURIResolver()
Get the URI Resolver being used in this compilation episode.
|
int |
getXsltVersion()
Deprecated.
since 9.8 (always returns 30)
|
boolean |
isAssertionsEnabled()
Ask whether assertions (xsl:assert instructions) should be enabled.
|
boolean |
isCompileWithTracing()
Determine whether trace hooks are included in the compiled code.
|
boolean |
isGenerateByteCode()
Ask whether bytecode is to be generated in the compiled code.
|
boolean |
isJustInTimeCompilation()
Ask whether just-in-time compilation of template rules is in use for this XSLT compilation
|
boolean |
isRelocatable()
Ask whether any package produced by this compiler can be deployed to a different location, with a different base URI
|
boolean |
isSchemaAware()
Ask whether schema-awareness has been requested by means of a call on
setSchemaAware(boolean) |
boolean |
isVersionWarning()
Deprecated.
since 9.8.0.2. Always now returns false. See bug 3278.
|
void |
setAssertionsEnabled(boolean enabled)
Say whether assertions (xsl:assert instructions) should be enabled.
|
void |
setCodeInjector(CodeInjector injector)
Set whether trace hooks are to be included in the compiled code.
|
void |
setDefaultCollation(java.lang.String collation)
Set the name of the default collation
|
void |
setDefaultInitialMode(StructuredQName initialMode)
Set the default initial mode name for a stylesheet compiled using this CompilerInfo.
|
void |
setDefaultInitialTemplate(StructuredQName initialTemplate)
Set the default initial template name for a stylesheet compiled using this CompilerInfo.
|
void |
setErrorListener(javax.xml.transform.ErrorListener listener)
Set the ErrorListener to be used during this compilation episode
|
void |
setExtensionFunctionLibrary(FunctionLibrary library)
Deprecated.
since 9.7. Any extension function library set using this mechanism will
not be available if the package is saved and reloaded.
|
void |
setGenerateByteCode(boolean option)
Set whether bytecode should be generated for the compiled stylesheet.
|
void |
setJustInTimeCompilation(boolean jit)
Say whether just-in-time compilation of template rules should be used for this XSLT compilation
|
void |
setMessageReceiverClassName(java.lang.String messageReceiverClassName)
Set the name of the class that will be instantiated to create a MessageEmitter,
to process the output of xsl:message instructions in XSLT.
|
void |
setOutputURIResolver(OutputURIResolver outputURIResolver)
Set the OutputURIResolver that will be used to resolve URIs used in the
href attribute of the xsl:result-document instruction.
|
void |
setPackageLibrary(PackageLibrary library)
Set the package library to be used during the compilation episode.
|
void |
setParameter(StructuredQName name,
Sequence seq)
Set the value of a stylesheet parameter.
|
void |
setRecoveryPolicy(int policy)
Set the policy for handling recoverable errrors.
|
void |
setRelocatable(boolean relocatable)
Say whether any package produced by this compiler can be deployed to a different location, with a different base URI
|
void |
setSchemaAware(boolean schemaAware)
Say that the stylesheet must be compiled to be schema-aware, even if it contains no
xsl:import-schema declarations.
|
void |
setTargetEdition(java.lang.String edition)
Set the target edition under which the stylesheet will be executed.
|
void |
setURIResolver(javax.xml.transform.URIResolver resolver)
Set the URI Resolver to be used in this compilation episode.
|
void |
setVersionWarning(boolean warn)
Deprecated.
since 9.8.0.2. The method no longer has any effect. See bug 3278.
|
void |
setXQueryLibraries(java.util.Collection<QueryLibrary> libraries) |
void |
setXsltVersion(int version)
Deprecated.
since Saxon 9.8 (has no effect).
|
public CompilerInfo(Configuration config)
new CompilerInfo(config.getDefaultXsltCompilerInfo()
).public CompilerInfo(CompilerInfo info)
info
- the existing CompilerInfo objectpublic void copyFrom(CompilerInfo info)
info
- the CompilerInfo to be copiedpublic Configuration getConfiguration()
public void setJustInTimeCompilation(boolean jit)
jit
- true if just-in-time compilation should be used. With this option, static errors in the
stylesheet code may be reported only when a template rule is first executedpublic boolean isJustInTimeCompilation()
public void setURIResolver(javax.xml.transform.URIResolver resolver)
resolver
- The URIResolver to be used. This is used to dereference URIs encountered in constructs
such as xsl:include, xsl:import, and xsl:import-schema.public void setParameter(StructuredQName name, Sequence seq)
name
- the name of the stylesheet parameterseq
- the value of the stylesheet parameterpublic GlobalParameterSet getParameters()
setParameter(net.sf.saxon.om.StructuredQName, net.sf.saxon.om.Sequence)
method.public void clearParameters()
setParameter(net.sf.saxon.om.StructuredQName, net.sf.saxon.om.Sequence)
method.public void setTargetEdition(java.lang.String edition)
edition
- the Saxon edition for the run-time environment. One of "EE", "PE", "HE", "JS", or "JS2".public java.lang.String getTargetEdition()
public boolean isRelocatable()
public void setRelocatable(boolean relocatable)
relocatable
- if true then static-base-uri() represents the deployed location of the package,
rather than its compile time locationpublic void setPackageLibrary(PackageLibrary library)
library
- the package librarypublic PackageLibrary getPackageLibrary()
public boolean isAssertionsEnabled()
public void setAssertionsEnabled(boolean enabled)
enabled
- true if assertions are enabled at compile timepublic void setGenerateByteCode(boolean option)
option
- true if bytecode is to be generated, false otherwisepublic boolean isGenerateByteCode()
public javax.xml.transform.URIResolver getURIResolver()
public OutputURIResolver getOutputURIResolver()
public void setOutputURIResolver(OutputURIResolver outputURIResolver)
outputURIResolver
- the OutputURIResolver to be used.public void setErrorListener(javax.xml.transform.ErrorListener listener)
listener
- The error listener to be used. This is notified of all errors detected during the
compilation.public javax.xml.transform.ErrorListener getErrorListener()
public java.lang.String getMessageReceiverClassName()
public void setMessageReceiverClassName(java.lang.String messageReceiverClassName)
messageReceiverClassName
- the message emitter class. This
must implement net.sf.saxon.event.Emitter.public void setDefaultCollation(java.lang.String collation)
collation
- the name of the default collation (if the stylesheet doesn't specify otherwise)public java.lang.String getDefaultCollation()
public void setCodeInjector(CodeInjector injector)
injector
- the code injector used to insert trace or debugging hooks, or null to clear any
existing entrypublic CodeInjector getCodeInjector()
public boolean isCompileWithTracing()
public void setRecoveryPolicy(int policy)
policy
- the recovery policy to be used. The options are Configuration.RECOVER_SILENTLY
,
Configuration.RECOVER_WITH_WARNINGS
, or Configuration.DO_NOT_RECOVER
.public int getRecoveryPolicy()
public boolean isVersionWarning()
public void setVersionWarning(boolean warn)
warn
- true if these messages are to be output.public void setSchemaAware(boolean schemaAware)
schemaAware
- If true, the stylesheet will be compiled with schema-awareness
enabled even if it contains no xsl:import-schema declarations. If false, the stylesheet
is treated as schema-aware only if it contains one or more xsl:import-schema declarationspublic boolean isSchemaAware()
setSchemaAware(boolean)
public void setDefaultInitialTemplate(StructuredQName initialTemplate)
initialTemplate
- the name of the default initial template, or null if there is
no default. No error occurs (until run-time) if the stylesheet does not contain a template
with this name.public StructuredQName getDefaultInitialTemplate()
setDefaultInitialTemplate(net.sf.saxon.om.StructuredQName)
public void setDefaultInitialMode(StructuredQName initialMode)
initialMode
- the name of the default initial mode, or null if there is
no default. No error occurs (until run-time) if the stylesheet does not contain a mode
with this name.public StructuredQName getDefaultInitialMode()
setDefaultInitialMode(net.sf.saxon.om.StructuredQName)
public void setXsltVersion(int version)
version
- The decimal version number times ten, for example 30 indicates
XSLT 3.0.public int getXsltVersion()
public void setExtensionFunctionLibrary(FunctionLibrary library)
library
- the function library to be added (replacing any that has previously been set).
May be null to clear a previously-set librarypublic FunctionLibrary getExtensionFunctionLibrary()
setExtensionFunctionLibrary(net.sf.saxon.functions.FunctionLibrary)
.public void setXQueryLibraries(java.util.Collection<QueryLibrary> libraries)
public java.util.Collection<QueryLibrary> getQueryLibraries()
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.