API

com.ibm.xml.xapi
Interface XDynamicContext


public interface XDynamicContext

Use the XDynamicContext to override execution-time settings. These are settings used when executing a prepared expression, query or stylesheet. See the XPathExecutable, XQueryExecutable, and XSLTExecutable execute methods that take an XDynamicContext as an argument. The XFactory class has the method newDynamicContext for creating new instances.

Execution time settings such as the values of external variables and resolvers for source, collections and results may be different for each call to the execute methods on an Executable.

Examples of execution-time settings:

Settings in XDynamicContext map to settings in the XPath, XQuery and XSLT dynamic context as defined in the specifications:

See Also:
XExecutable, XPathExecutable, XQueryExecutable, XSLTExecutable, XFactory.newDynamicContext()

Method Summary
 void bind(QName name, BigDecimal value)
          Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT).
 void bind(QName name, BigInteger value)
          Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT).
 void bind(QName name, boolean value)
          Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT).
 void bind(QName name, byte value)
          Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT).
 void bind(QName name, byte[] value)
          Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT).
 void bind(QName name, double value)
          Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT).
 void bind(QName name, Duration value)
          Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT).
 void bind(QName name, float value)
          Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT).
 void bind(QName name, int value)
          Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT).
 void bind(QName name, long value)
          Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT).
 void bind(QName name, Node value)
          Bind a value to a variable (XPath, XQuery) or a param (XSLT).
 void bind(QName name, Object value)
          Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT).
 void bind(QName name, QName value)
          Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT).
 void bind(QName name, short value)
          Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT).
 void bind(QName name, Source source)
          Bind a value to a variable (XPath, XQuery) or a param (XSLT).
 void bind(QName name, String value)
          Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT).
 void bind(QName name, XItemView item)
          Bind a value to a variable (XPath, XQuery) or a param (XSLT).
 void bind(QName name, XMLGregorianCalendar value)
          Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT).
 void bindCollation(String uri, Collator collator)
          Associates the specified collation URI with the specified java.text.Collator.
 void bindCollation(String uri, Locale locale)
          Associates the specified collation URI with the java.text.Collator for the specified java.util.Locale.
 void bindFunction(QName qname, Method method)
          Bind a function to a name.
 void bindFunction(QName qname, Method method, Object instanceObject)
          Bind a function to a name.
 void bindSequence(QName name, BigDecimal[] values)
          Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT).
 void bindSequence(QName name, BigInteger[] values)
          Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT).
 void bindSequence(QName name, boolean[] values)
          Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT).
 void bindSequence(QName name, byte[] values)
          Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT) depending on the type.
 void bindSequence(QName name, byte[][] values)
          Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT).
 void bindSequence(QName name, double[] values)
          Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT).
 void bindSequence(QName name, Duration[] values)
          Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT).
 void bindSequence(QName name, float[] values)
          Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT).
 void bindSequence(QName name, int[] values)
          Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT).
 void bindSequence(QName name, long[] values)
          Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT).
 void bindSequence(QName name, QName[] values)
          Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT).
 void bindSequence(QName name, short[] values)
          Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT).
 void bindSequence(QName name, String[] values)
          Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT).
 void bindSequence(QName name, XMLGregorianCalendar[] values)
          Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT).
 void bindSequence(QName name, XSequenceCursor sequence)
          Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT).
 String getBaseOutputURI()
          Get the base output URI.
 Collator getCollation(String uri)
          Get the Collator associated with the given collation URI.
 XCollectionResolver getCollectionResolver()
          Get the registered resolver for collections.
 boolean getFeature(String name)
          Get the state of the named feature.
 Duration getImplicitTimeZone()
          Get the implicit time zone as a Duration object.
 XMessageHandler getMessageHandler()
          Get the dynamic message handler.
 XResultResolver getResultResolver()
          Get the registered resolver for result documents.
 XSourceResolver getSourceResolver()
          Get the registered resolver for source documents.
 XUnparsedTextResolver getUnparsedTextResolver()
          Get the registered resolver for unparsed text resources.
 QName getXSLTInitialMode()
          Get the name of the initial mode
 QName getXSLTInitialTemplate()
          Get the name of the initial template.
 void removeBinding(QName qname)
          Remove the binding for the specified variable.
 void removeCollationBinding(String uri)
          Remove the Collator associated with the given collation URI.
 void removeFunctionBinding(QName qname, int arity)
          Remove the binding for the specified function.
 void setBaseOutputURI(String uri)
          Sets the base URI to use when resolving result documents.
 void setCollectionResolver(XCollectionResolver collectionResolver)
          Registers a URI resolver for collections.
 void setFeature(String name, boolean value)
          Set a feature for this dynamic context.
 void setImplicitTimeZone(Duration implicitTimeZone)
          Sets the implicit time zone.
 void setMessageHandler(XMessageHandler handler)
          Set a message handler to process dynamic errors and messages.
 void setResultResolver(XResultResolver resultResolver)
          Register a resolver for result documents.
 void setSourceResolver(XSourceResolver sourceResolver)
          Register a resolver for dynamically resolved source documents such as for the fn:doc function and the XSLT document function.
 void setUnparsedTextResolver(XUnparsedTextResolver unparsedTextResolver)
          Register a resolver for external resources loaded through the XSLT unparsed-text function.
 void setXSLTInitialMode(QName initialMode)
          Specify a mode to use as the initial mode in an XSLT transformation.
 void setXSLTInitialTemplate(QName initialTemplate)
          Specify a named template to use as the initial template in an XSLT transformation.
 

Method Detail

bind

void bind(QName name,
          Object value)
Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT). The value must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
value - The value of the variable.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bind

void bind(QName name,
          String value)
Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT). The value must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
value - The value of the variable.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bindSequence

void bindSequence(QName name,
                  String[] values)
Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT). The values must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
values - The values for the sequence.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bind

void bind(QName name,
          boolean value)
Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT). The value must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
value - The value of the variable.
Throws:
NullPointerException - if name is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bindSequence

void bindSequence(QName name,
                  boolean[] values)
Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT). The values must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
values - The values for the sequence.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bind

void bind(QName name,
          byte value)
Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT). The value must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
value - The value of the variable.
Throws:
NullPointerException - if name is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bindSequence

void bindSequence(QName name,
                  byte[] values)
Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT) depending on the type. The values must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name. Use this method for hexBinary or base64Binary types.

Parameters:
name - The name of the variable.
values - The values for the sequence.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bind

void bind(QName name,
          byte[] value)
Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT). The value must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name. Use this method for hexBinary or base64Binary types.

Parameters:
name - The name of the variable.
value - The value of the variable.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bindSequence

void bindSequence(QName name,
                  byte[][] values)
Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT). The values must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name. Use this method for sequences of hexBinary or base64Binary.

Parameters:
name - The name of the variable.
values - The values for the sequence.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bind

void bind(QName name,
          short value)
Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT). The value must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
value - The value of the variable.
Throws:
NullPointerException - if name is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bindSequence

void bindSequence(QName name,
                  short[] values)
Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT). The values must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
values - The values for the sequence.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bind

void bind(QName name,
          int value)
Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT). The value must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
value - The value of the variable.
Throws:
NullPointerException - if name is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bindSequence

void bindSequence(QName name,
                  int[] values)
Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT). The values must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
values - The values for the sequence.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bind

void bind(QName name,
          long value)
Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT). The value must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
value - The value of the variable.
Throws:
NullPointerException - if name is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bindSequence

void bindSequence(QName name,
                  long[] values)
Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT). The values must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
values - The values for the sequence.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bind

void bind(QName name,
          float value)
Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT). The value must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
value - The value of the variable.
Throws:
NullPointerException - if name is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bindSequence

void bindSequence(QName name,
                  float[] values)
Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT). The values must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
values - The values for the sequence.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bind

void bind(QName name,
          double value)
Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT). The value must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
value - The value of the variable.
Throws:
NullPointerException - if name is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bindSequence

void bindSequence(QName name,
                  double[] values)
Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT). The values must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
values - The values for the sequence.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bind

void bind(QName name,
          BigDecimal value)
Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT). The value must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
value - The value of the variable.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bindSequence

void bindSequence(QName name,
                  BigDecimal[] values)
Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT). The values must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
values - The values for the sequence.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bind

void bind(QName name,
          BigInteger value)
Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT). The value must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
value - The value of the variable.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bindSequence

void bindSequence(QName name,
                  BigInteger[] values)
Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT). The values must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
values - The values for the sequence.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bind

void bind(QName name,
          QName value)
Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT). The value must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
value - The value of the variable.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bindSequence

void bindSequence(QName name,
                  QName[] values)
Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT). The values must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
values - The values for the sequence.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bind

void bind(QName name,
          XMLGregorianCalendar value)
Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT). The value must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
value - The value of the variable.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bindSequence

void bindSequence(QName name,
                  XMLGregorianCalendar[] values)
Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT). The values must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
values - The values for the sequence.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bind

void bind(QName name,
          Duration value)
Bind an atomic value to a variable (XPath, XQuery) or a param (XSLT). The value must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
value - The value of the variable.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bindSequence

void bindSequence(QName name,
                  Duration[] values)
Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT). The values must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
values - The values for the sequence.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bind

void bind(QName name,
          Node value)
Bind a value to a variable (XPath, XQuery) or a param (XSLT). The value must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
value - The value of the variable.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bind

void bind(QName name,
          Source source)
Bind a value to a variable (XPath, XQuery) or a param (XSLT). The value must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
value - The value of the variable.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bind

void bind(QName name,
          XItemView item)
Bind a value to a variable (XPath, XQuery) or a param (XSLT). The value must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
value - The value of the variable.
Throws:
NullPointerException - if name, or value is null.
See Also:
XStaticContext.declareVariable(QName, QName)

bindSequence

void bindSequence(QName name,
                  XSequenceCursor sequence)
Bind a sequence value to a variable (XPath, XQuery) or a param (XSLT). The value must be valid for the type that was specified in the static context (XPath), in the query (XQuery) or in the stylesheet (XSLT) for the same name.

Parameters:
name - The name of the variable.
value - The value of the variable, may be null for an empty sequence.
Throws:
NullPointerException - if name is null.
See Also:
XStaticContext.declareVariable(QName, QName)

removeBinding

void removeBinding(QName qname)
Remove the binding for the specified variable.

Parameters:
qname - The name of the variable.
Throws:
NullPointerException - if qname is null.

bindFunction

void bindFunction(QName qname,
                  Method method)
Bind a function to a name. For static methods only. Use the version of bindFunction that takes the instance object as a parameter for instance methods.

Parameters:
qname - The name of the function.
method - The method.
Throws:
NullPointerException - if qname, or method is null.
See Also:
bindFunction(QName, Method, Object)

bindFunction

void bindFunction(QName qname,
                  Method method,
                  Object instanceObject)
Bind a function to a name. The method being bound must be an instance method. The instanceObject will be used as the object on which to call the method.

Parameters:
qname - The name of the function.
method - The method.
instanceObject - The object on which to call the method.
Throws:
NullPointerException - if any of qname, method, or instanceObject is null.

removeFunctionBinding

void removeFunctionBinding(QName qname,
                           int arity)
Remove the binding for the specified function.

Parameters:
qname - The name of the function.
arity - The arity of the function. This is the number of parameters that the function takes. This function for example (removeFunctionThrows:
NullPointerException - if qname is null.
IllegalArgumentException - if the arity

bindCollation

void bindCollation(String uri,
                   Locale locale)
Associates the specified collation URI with the java.text.Collator for the specified java.util.Locale.

A NullPointerException is thrown if either argument is null. An IllegalArgumentException is thrown if uri is a relative URI reference or is the Unicode code point collation URI.

Calling this method is equivalent to calling bindCollation(uri, Collator.getInstance(locale))

With the exception of the Unicode code point collation URI, if a stylesheet, query or XPath expression performs an operation that requires a collation URI that has not been bound to a Collator in the XDynamicContext, the processor will throw an XProcessException.

Parameters:
uri - A collation URI
locale - The locale whose Collator will be associated with the specified collation URI
Throws:
IllegalArgumentException - if the URI is not an absolute URI reference or is the Unicode code point collation URI
NullPointerException - if either the URI or the locale is a null reference
See Also:
XStaticContext.UNICODE_CODE_POINT_COLLATION_URI

bindCollation

void bindCollation(String uri,
                   Collator collator)
Associates the specified collation URI with the specified java.text.Collator.

A NullPointerException is thrown if either argument is null. An IllegalArgumentException is thrown if uri is a relative URI reference or is the Unicode code point collation URI.

With the exception of the Unicode code point collation URI, if a stylesheet, query or XPath expression performs an operation that requires a collation URI that has not been bound to a Collator in the XDynamicContext, the processor will throw an XProcessException.

Parameters:
uri - A collation URI
locale - The locale whose Collator will be associated with the specified collation URI
Throws:
IllegalArgumentException - if the URI is not an absolute URI reference or is the Unicode code point collation URI
NullPointerException - if either the URI or the locale is a null reference
See Also:
XStaticContext.UNICODE_CODE_POINT_COLLATION_URI

getCollation

Collator getCollation(String uri)
Get the Collator associated with the given collation URI.

Parameters:
uri - The collation URI.
Returns:
The associated Collator or null if no collator has been bound to this the given URI.
Throws:
NullPointerException - if uri is null.

removeCollationBinding

void removeCollationBinding(String uri)
Remove the Collator associated with the given collation URI.

Parameters:
uri - The collation URI.
Throws:
NullPointerException - if uri is null.

getImplicitTimeZone

Duration getImplicitTimeZone()
Get the implicit time zone as a Duration object.

Returns:
The implicit time zone or null if not set.

setImplicitTimeZone

void setImplicitTimeZone(Duration implicitTimeZone)
Sets the implicit time zone. Pass in null for the implicitTimeZone to restore the default.

Parameters:
implicitTimeZone - Time zone to be set as a Duration object or null.

setBaseOutputURI

void setBaseOutputURI(String uri)

Sets the base URI to use when resolving result documents. Pass in null for the uri to restore the default. The default is either the base URI for the primary result document if one is passed into the execute method or the current working directory.

This setting is XSLT specific.

Parameters:
uri - The base output URI or null.

getBaseOutputURI

String getBaseOutputURI()
Get the base output URI.

Returns:
The base output URI or null if not set.

setMessageHandler

void setMessageHandler(XMessageHandler handler)
Set a message handler to process dynamic errors and messages. Pass in null for the handler to restore the default message handling behaviour. The default is to print messages to System.err and to also throw an XProcessException for fatal errors.

Parameters:
handler - The error handler or null.
See Also:
XMessageHandler

getMessageHandler

XMessageHandler getMessageHandler()
Get the dynamic message handler.

Returns:
The message handler or null if not set.

getSourceResolver

XSourceResolver getSourceResolver()
Get the registered resolver for source documents.

Returns:
The registered resolver or null if there is none.

setSourceResolver

void setSourceResolver(XSourceResolver sourceResolver)
Register a resolver for dynamically resolved source documents such as for the fn:doc function and the XSLT document function. This source resolver has no effect on documents that are resolved statically such as XSLT imports and includes. For these documents the XStaticContext.setSourceResolver method should be used. Pass in null for the sourceResolver to restore the default source lookup behaviour. The default source resolution behavior is to interpret relative URIs in terms of the base URI from the static context if available or to interpret them as file: paths relative to the current working directory if the base URI is not available. Absolute URIs are used unchanged.

Parameters:
sourceResolver - The source document resolver or null.
See Also:
XSourceResolver

getResultResolver

XResultResolver getResultResolver()
Get the registered resolver for result documents.

Returns:
The registered resolver or null if there is none.

setResultResolver

void setResultResolver(XResultResolver resultResolver)

Register a resolver for result documents. The resolver will be invoked when the xsl:result-document instruction is used in a XSLT stylesheet. Pass in null for resultResolver to restore the default result resolution behaviour. The default behavior is to use the base output URI to resolve result documents.

This setting is XSLT specific.

Parameters:
resultResolver - The result document resolver or null.
See Also:
XResultResolver

setFeature

void setFeature(String name,
                boolean value)

Set a feature for this dynamic context.

Feature names should be fully qualified URIs. Implementations may define their own features.

Note: there are no currently defined features, this is for future use.

Parameters:
name - Feature name.
value - Is feature state true or false.
Throws:
NullPointerException - if name is null.

getFeature

boolean getFeature(String name)

Get the state of the named feature.

Feature names should be fully qualified URIs. Implementations may define their own features.

Note: there are no currently defined features, this is for future use.

Parameters:
name - Feature name.
Returns:
State of the named feature.
Throws:
NullPointerException - if name is null.

setXSLTInitialTemplate

void setXSLTInitialTemplate(QName initialTemplate)

Specify a named template to use as the initial template in an XSLT transformation.

If a named template is not set, the initial template is determined by the initial mode, context node, and template matching rules

This setting is XSLT specific.

Parameters:
initialTemplate - The name of the template to use as the initial template, or null to allow the initial template to be determined by the template matching rules.

getXSLTInitialTemplate

QName getXSLTInitialTemplate()
Get the name of the initial template.

Returns:
The name of the initial template, or null if not set.

setXSLTInitialMode

void setXSLTInitialMode(QName initialMode)

Specify a mode to use as the initial mode in an XSLT transformation.

This setting is XSLT specific.

Parameters:
initialMode - The name of the initial mode, or null for the default mode.

getXSLTInitialMode

QName getXSLTInitialMode()
Get the name of the initial mode

Returns:
The name of the initial mode, or null if not set.

getCollectionResolver

XCollectionResolver getCollectionResolver()
Get the registered resolver for collections.

Returns:
The XCollectionResolver if set, otherwise null.

setCollectionResolver

void setCollectionResolver(XCollectionResolver collectionResolver)
Registers a URI resolver for collections. Pass in null for the collectionResolver to remove it. If no collection resolver is registered then calls to fn:collection will result in a recoverable error and the empty sequence is used for the collection.

Parameters:
collectionResolver - The collection resolver or null.
See Also:
XCollectionResolver

setUnparsedTextResolver

void setUnparsedTextResolver(XUnparsedTextResolver unparsedTextResolver)
Register a resolver for external resources loaded through the XSLT unparsed-text function. Pass in null for the unparsedTextResolver to restore the default unparsed text lookup behaviour. The default unparsed text resolution behaviour is to interpret relative URIs in terms of the base URI from the static context if available or to interpret them as file: paths relative to the current working directory if the base URI is not available. Absolute URIs are used unchanged.

Parameters:
unparsedTextResolver - The unparsed text resolver or null.
See Also:
XUnparsedTextResolver

getUnparsedTextResolver

XUnparsedTextResolver getUnparsedTextResolver()
Get the registered resolver for unparsed text resources.

Returns:
The registered resolver or null if there is none.

IBM Copyright 2004-2008