This module provides an Input Module interface to any XML document, by using
XPath expressions as attribute keys.
The XML can be obtained from any Cocoon Source (e.g.,
cocoon:/..., context://.., and regular URLs).
Sources can be cached in memory for better performance and reloaded if
changed. The source can also contain references to other input modules to allow the source
file name to be determined dynamically.
Caching and reloading can be turned on / off (default: caching on,
reloading off) through <reloadable>false</reloadable>
and <cacheable>false</cacheable>. The file
(source) to use is specified through <file
src="protocol:path/to/file.xml" reloadable="true" cacheable="true"/>
optionally overriding the defaults for caching and/or reloading. When specfied as attributes
to the file element the values for cacheable and reloadable may be input module references which
will be resolved on every call. These must resolve to 'true' or 'false'.
>
The XML documents will be cached using the Store configured via the cache-role configuration
element. If not specified the default Store as specified in this classes ROLE attribute will
be used.
In addition, xpath expressions can be cached for higher performance.
Thus, if an expression has been evaluated for a file, the result
is cached and will be reused, the expression is not evaluated
a second time. This can be turned off using the cache-expressions
configuration option.
Static (cocoon.xconf) configuration.
Configuration is expected to be of the form:
<...>
<reloadable>true|false</reloadable>
<cacheable>true|false</cacheable>
<cache-role>org.apache.excalibur.store.Store/TransientStore</cache-role>
<file src="src"/>
...
</...>
The <file/> element specifies a file pattern. Only one
<file> can be specified, however it can contain references to input modules which will be resolved
each time the module is used. The configured src is used if not
overridden via a file parameter in the sitemap.