public class CompilerInfo extends Object implements Serializable
Constructor and Description |
---|
CompilerInfo()
Create an empty CompilerInfo object with default settings
|
CompilerInfo(CompilerInfo info)
Create a CompilerInfo object as a copy of another CompilerInfo object
|
Modifier and Type | Method and Description |
---|---|
CodeInjector |
getCodeInjector()
Get the registered CodeInjector, if any
|
CollationMap |
getCollationMap()
Get information about named collations and 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.
|
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) . |
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.
|
GlobalParameterSet |
getParameters() |
int |
getRecoveryPolicy()
Get the policy for handling recoverable errors.
|
URIResolver |
getURIResolver()
Get the URI Resolver being used in this compilation episode.
|
DecimalValue |
getXsltVersion()
Get the version of XSLT supported by this processor
|
boolean |
isCompileWithTracing()
Determine whether trace hooks are included in the compiled code.
|
boolean |
isSchemaAware()
Ask whether schema-awareness has been requested by means of a call on
setSchemaAware(boolean) |
boolean |
isVersionWarning()
Ask whether a warning is to be output when the stylesheet version does not match the processor version.
|
void |
setCodeInjector(CodeInjector injector)
Set whether trace hooks are to be included in the compiled code.
|
void |
setCollationMap(CollationMap map)
Set information about named collations and 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(ErrorListener listener)
Set the ErrorListener to be used during this compilation episode
|
void |
setExtensionFunctionLibrary(FunctionLibrary library)
Set a library of extension functions.
|
void |
setMessageReceiverClassName(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 |
setParameter(StructuredQName name,
Sequence seq) |
void |
setRecoveryPolicy(int policy)
Set the policy for handling recoverable errrors.
|
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 |
setURIResolver(URIResolver resolver)
Set the URI Resolver to be used in this compilation episode.
|
void |
setVersionWarning(boolean warn)
Say whether a warning is to be output when the stylesheet version does not match the processor version.
|
void |
setXsltVersion(DecimalValue version)
Set the version of XSLT to be supported by this processor.
|
public CompilerInfo()
public CompilerInfo(CompilerInfo info)
info
- the existing CompilerInfo objectpublic void setURIResolver(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)
public GlobalParameterSet getParameters()
public URIResolver getURIResolver()
public OutputURIResolver getOutputURIResolver()
public void setOutputURIResolver(OutputURIResolver outputURIResolver)
outputURIResolver
- the OutputURIResolver to be used.public void setErrorListener(ErrorListener listener)
listener
- The error listener to be used. This is notified of all errors detected during the
compilation.public ErrorListener getErrorListener()
public String getMessageReceiverClassName()
public void setMessageReceiverClassName(String messageReceiverClassName)
messageReceiverClassName
- the message emitter class. This
must implement net.sf.saxon.event.Emitter.public void setCollationMap(CollationMap map)
map
- the collation map to be usedpublic CollationMap getCollationMap()
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(DecimalValue version)
The value 0.0 (which is the default) indicates that the processor version is to be taken from the version attribute of the xsl:stylesheet element.
XSLT 2.1 features are supported only in Saxon-EE. Setting the version to 3.0 here will not fail if the wrong edition is in use, but use of XSLT 3.0 features will fail subsequently.
version
- must be numerically equal to 0.0, 2.0 or 3.0IllegalArgumentException
- if the version is invalidpublic DecimalValue getXsltVersion()
DecimalValue.TWO
or DecimalValue.THREE
,
or zero indicating that the processor versino is taken from the version attribute of the xsl:stylesheet element.)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)
.Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.