|
Qizx/open API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.axyana.qizxopen.xquery.XQModuleManager
Helper class used by a XQuery engine to compile and cache XQuery modules and XSLT stylesheets.
This is part of the "server side", not seen by applications.
This class is a simple implementation that assumes that all modules URIs can be resolved using the same base location (any URL supported by Java). If the physical location ("at") is not specified in the "import module" declaration, then the module URI is used as follows: periods are replaced by '/' and the extension '.xqm' is appended.
For example with a base URL equal to
http://myserver.net/xqmodules
, the declaration:
import module mod1 = "myapp.module1"
will resolve the module
location as http://myserver.net/xqmodules/myapp/module1.xqm
Ensures that a module is loaded only once for the same query (i.e. two references to a module from the same query must yield the same object). Modules can be shared by several Connections and are thread safe.
The method resolveModuleLocation(java.lang.String, java.lang.String, java.lang.String)
can be overriden in a subclass
to redefine the way a module URI is resolved.
Field Summary | |
static java.lang.String |
XSLT_OUTPUT_FILE
|
Constructor Summary | |
XQModuleManager(java.lang.String baseURI)
Builds a Module Manager with a base location for resolution of module URIs. |
|
XQModuleManager(java.net.URL baseURL)
Builds a Module Manager with a base location for resolution of module URIs. |
Method Summary | |
void |
error(javax.xml.transform.TransformerException exception)
|
void |
fatalError(javax.xml.transform.TransformerException exception)
|
javax.xml.transform.TransformerFactory |
getXSLTFactory()
Gets the TransformerFactory used for XSLT transformations. |
net.axyana.qizxopen.xquery.impl.Module |
loadModule(net.axyana.qizxopen.xquery.impl.Parser caller,
java.lang.String uri,
java.lang.String location,
java.lang.String auxiliaryBase)
[used internally by the parser.] |
java.net.URL |
resolveModuleLocation(java.lang.String namespaceURI,
java.lang.String physicalURI,
java.lang.String auxiliaryBase)
Overridable method for resolving a module name and location to an actual URL. |
void |
setBaseURL(java.net.URL baseURL)
|
void |
setXSLTFactory(javax.xml.transform.TransformerFactory value)
Sets the TransformerFactory used for XSLT transformations. |
void |
unloadAllModules()
Unloads all modules. |
void |
warning(javax.xml.transform.TransformerException exception)
|
IDocument |
xslTransform(XQNode source,
java.lang.String templates,
java.util.Properties parameters,
java.util.Properties options)
Runs a XSLT transformation on an element (internal use). |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String XSLT_OUTPUT_FILE
Constructor Detail |
public XQModuleManager(java.net.URL baseURL) throws java.io.IOException
public XQModuleManager(java.lang.String baseURI) throws java.io.IOException
Method Detail |
public void setBaseURL(java.net.URL baseURL)
public java.net.URL resolveModuleLocation(java.lang.String namespaceURI, java.lang.String physicalURI, java.lang.String auxiliaryBase) throws java.io.IOException
java.io.IOException
public void unloadAllModules()
Note: Due to possible dependencies between modules, it would be very difficult to unload a module selectively.
public net.axyana.qizxopen.xquery.impl.Module loadModule(net.axyana.qizxopen.xquery.impl.Parser caller, java.lang.String uri, java.lang.String location, java.lang.String auxiliaryBase) throws java.io.IOException, XQueryException
java.io.IOException
XQueryException
public void setXSLTFactory(javax.xml.transform.TransformerFactory value)
public javax.xml.transform.TransformerFactory getXSLTFactory()
public void error(javax.xml.transform.TransformerException exception) throws javax.xml.transform.TransformerException
error
in interface javax.xml.transform.ErrorListener
javax.xml.transform.TransformerException
public void fatalError(javax.xml.transform.TransformerException exception) throws javax.xml.transform.TransformerException
fatalError
in interface javax.xml.transform.ErrorListener
javax.xml.transform.TransformerException
public void warning(javax.xml.transform.TransformerException exception)
warning
in interface javax.xml.transform.ErrorListener
public IDocument xslTransform(XQNode source, java.lang.String templates, java.util.Properties parameters, java.util.Properties options) throws javax.xml.transform.TransformerException, XQueryException
source
- node on which the transformation is applied.templates
- URI of a stylesheet (resolved by the Module Manager).parameters
- a set name/value pairs specifying initial values for
global xsl:param in the stylesheet.options
- a set name/value pairs specifying
options for the transformation:javax.xml.transform.TransformerException
XQueryException
|
© 2005 Axyana Software | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |