com.ibm.xml.xapi
Interface XCompilationFactory
- public interface XCompilationFactory
Factory for compiling expressions, queries and stylesheets into Java classes.
Load methods are provided for loading the compiled java classes
and instantiating the executable. Compiling the expression, query or
stylesheet ahead of time means that the cost of preparation can
be avoided during the application runtime. The getCompilationFactory
method on XFactory
can be used to get an XCompilationFactory
instance.
See Also:
Method Summary
Modifier and Type | Method and Description |
---|---|
|
compileXPath(javax.xml.transform.stream.StreamSource expression,XCompilationParameters parameters)
Compile an XPath expression into Java classes.
|
|
compileXPath(javax.xml.transform.stream.StreamSource expression,XStaticContext context,XCompilationParameters parameters)
Compile an XPath expression into Java classes.
|
|
compileXPath(java.lang.String expression,XCompilationParameters parameters)
Compile an XPath expression into Java classes.
|
|
compileXPath(java.lang.String expression,XStaticContext context,XCompilationParameters parameters)
Compile an XPath expression into Java classes.
|
|
compileXQuery(javax.xml.transform.stream.StreamSource query,XCompilationParameters parameters)
Compile an XQuery expression into Java classes.
|
|
compileXQuery(javax.xml.transform.stream.StreamSource query,XStaticContext context,XCompilationParameters parameters)
Compile an XQuery expression into Java classes.
|
|
compileXQuery(java.lang.String query,XCompilationParameters parameters)
Compile an XQuery expression into Java classes.
|
|
compileXQuery(java.lang.String query,XStaticContext context,XCompilationParameters parameters)
Compile an XQuery expression into Java classes.
|
|
compileXSLT(javax.xml.transform.stream.StreamSource stylesheet,XCompilationParameters parameters)
Compile an XSL stylesheet into Java classes.
|
|
compileXSLT(javax.xml.transform.stream.StreamSource stylesheet,XStaticContext context,XCompilationParameters parameters)
Compile an XSL stylesheet into Java classes.
|
loadXPath(XCompilationParameters parameters)
Load the compiled XPath expression classes and return an
XPathExecutable object.
|
|
loadXQuery(XCompilationParameters parameters)
Load the compiled XQuery expression classes and return an
XQueryExecutable object.
|
|
loadXSLT(XCompilationParameters parameters)
Load the compiled XSL stylesheet classes and return an
XSLTransformExecutable object.
|
|
newCompilationParameters(java.lang.String className)
Create a new
XCompilationParameters object.
|
Method Detail
compileXPath
- boolean compileXPath(java.lang.String expression,
- XCompilationParameters parameters)
Compile an XPath expression into Java classes. The default static context
settings are used.
Parameters:
expression
- The XPath expression as a String
. parameters
- The compilation parameters. Use newCompilationParameters
to create a new XCompilationParameters
object. Returns:
True if the compilation was successful, false otherwise.
Throws:
java.lang.NullPointerException
- if the expression is null. XProcessException
- if the compile fails because of errors in the expression. See Also:
compileXPath
- boolean compileXPath(java.lang.String expression,
- XStaticContext context,
- XCompilationParameters parameters)
Compile an XPath expression into Java classes.
Parameters:
expression
- The XPath expression as a String
. context
- The static context. parameters
- The compilation parameters. Use newCompilationParameters
to create a new XCompilationParameters
object. Returns:
True if the compilation was successful, false otherwise.
Throws:
java.lang.NullPointerException
- if the expression is null. XProcessException
- if the compile fails because of errors in the expression. See Also:
compileXPath
- boolean compileXPath(javax.xml.transform.stream.StreamSource expression,
- XCompilationParameters parameters)
Compile an XPath expression into Java classes. The default static context
settings are used.
Parameters:
expression
- The XPath expression as a StreamSource
. parameters
- The compilation parameters. Use newCompilationParameters
to create a new XCompilationParameters
object. Returns:
True if the compilation was successful, false otherwise.
Throws:
java.lang.NullPointerException
- if the expression is null. XProcessException
- if the compile fails because of errors in the expression. See Also:
compileXPath
- boolean compileXPath(javax.xml.transform.stream.StreamSource expression,
- XStaticContext context,
- XCompilationParameters parameters)
Compile an XPath expression into Java classes.
Parameters:
expression
- The XPath expression as a StreamSource
. context
- The static context. parameters
- The compilation parameters. Use newCompilationParameters
to create a new XCompilationParameters
object. Returns:
True if the compilation was successful, false otherwise.
Throws:
java.lang.NullPointerException
- if the expression is null. XProcessException
- if the compile fails because of errors in the expression. See Also:
loadXPath
- XPathExecutable loadXPath(XCompilationParameters parameters)
Load the compiled XPath expression classes and return an
XPathExecutable
object.
Parameters:
parameters
- The compilation parameters. Use newCompilationParameters
to create a new XCompilationParameters
object. Returns:
An XPathExecutable object for the compiled XPath expression.
Throws:
XProcessException
- if the compiled expression cannot be loaded. See Also:
compileXQuery
- boolean compileXQuery(java.lang.String query,
- XCompilationParameters parameters)
Compile an XQuery expression into Java classes. The default static context
settings are used.
Parameters:
query
- The XQuery expression as a String
. parameters
- The compilation parameters. Use newCompilationParameters
to create a new XCompilationParameters
object. Returns:
True if the compilation was successful, false otherwise.
Throws:
java.lang.NullPointerException
- if the query is null. XProcessException
- if the compile fails because of errors in the query. See Also:
compileXQuery
- boolean compileXQuery(java.lang.String query,
- XStaticContext context,
- XCompilationParameters parameters)
Compile an XQuery expression into Java classes.
Parameters:
query
- The XQuery expression as an String
. context
- The static context. parameters
- The compilation parameters. Use newCompilationParameters
to create a new XCompilationParameters
object. Returns:
True if the compilation was successful, false otherwise.
Throws:
java.lang.NullPointerException
- if the query is null. XProcessException
- if the compile fails because of errors in the query. See Also:
compileXQuery
- boolean compileXQuery(javax.xml.transform.stream.StreamSource query,
- XCompilationParameters parameters)
Compile an XQuery expression into Java classes. The default static context
settings are used.
Parameters:
query
- The XQuery expression as a StreamSource
. parameters
- The compilation parameters. Use newCompilationParameters
to create a new XCompilationParameters
object. Returns:
True if the compilation was successful, false otherwise.
Throws:
java.lang.NullPointerException
- if the query is null. XProcessException
- if the compile fails because of errors in the query. See Also:
compileXQuery
- boolean compileXQuery(javax.xml.transform.stream.StreamSource query,
- XStaticContext context,
- XCompilationParameters parameters)
Compile an XQuery expression into Java classes.
Parameters:
query
- The XQuery expression as an StreamSource
. context
- The static context. parameters
- The compilation parameters. Use newCompilationParameters
to create a new XCompilationParameters
object. Returns:
True if the compilation was successful, false otherwise.
Throws:
java.lang.NullPointerException
- if the query is null. XProcessException
- if the compile fails because of errors in the query. See Also:
loadXQuery
- XQueryExecutable loadXQuery(XCompilationParameters parameters)
Load the compiled XQuery expression classes and return an
XQueryExecutable
object.
Parameters:
parameters
- The compilation parameters. Use newCompilationParameters
to create a new XCompilationParameters
object. Returns:
An XQueryExecutable object for the compiled XQuery expression.
Throws:
XProcessException
- if the compiled query cannot be loaded. See Also:
compileXSLT
- boolean compileXSLT(javax.xml.transform.stream.StreamSource stylesheet,
- XCompilationParameters parameters)
Compile an XSL stylesheet into Java classes. The default static context
is used.
Parameters:
stylesheet
- The XSL stylesheet as an StreamSource
. parameters
- The compilation parameters. Use newCompilationParameters
to create a new XCompilationParameters
object. Returns:
True if the compilation was successful, false otherwise.
Throws:
java.lang.NullPointerException
- if the stylesheet is null. XProcessException
- if the compile fails because of errors in the stylesheet. See Also:
compileXSLT
- boolean compileXSLT(javax.xml.transform.stream.StreamSource stylesheet,
- XStaticContext context,
- XCompilationParameters parameters)
Compile an XSL stylesheet into Java classes.
Parameters:
stylesheet
- The XSL stylesheet as an StreamSource
. context
- The static context. parameters
- The compilation parameters. Use newCompilationParameters
to create a new XCompilationParameters
object. Returns:
True if the compilation was successful, false otherwise.
Throws:
java.lang.NullPointerException
- if the stylesheet is null. XProcessException
- if the compile fails because of errors in the stylesheet. See Also:
loadXSLT
- XSLTExecutable loadXSLT(XCompilationParameters parameters)
Load the compiled XSL stylesheet classes and return an
XSLTransformExecutable
object.
Parameters:
parameters
- The compilation parameters. Use newCompilationParameters
to create a new XCompilationParameters
object. Returns:
An XSLTransformExecutable object for the compiled XSL stylesheet.
Throws:
XProcessException
- if the compiled stylesheet cannot be loaded. See Also:
newCompilationParameters
- XCompilationParameters newCompilationParameters( java.lang.String className)
Create a new
XCompilationParameters
object. Used to specify
compile and load parameters such as the class name and package name for the
generated classes. The class name is required.
Parameters:
className
- The class name to use for the generated classes. Must be
a valid Java class name. Returns:
A new
XCompilationParameters
object. Throws:
java.lang.NullPointerException
- if className
is null.