Add an external entity and its system ID to an XmlCatalogResolver.
Task package: | org.schmant.task.base |
Java package: | org.schmant.task.xml.catalog |
Category: | XML tasks |
Since: | 0.5 |
EntityFS-aware? | Yes* |
Implements: | ActionTaskFactory |
See also: | AddUriToCatalogTF XsltTF |
Description:
Add an external entity and its system ID to a XmlCatalogResolver. Entity resolving is used by XML parsers, such as the ones used by DomParseXmlTF.
A location prefix can be used to prefix every added system id with a preset string.
Required properties
Properties
locationPrefix | top |
If it is set, this prefix is prepended to all system ID:s.
- Setter method:
setLocationPrefix(String s)
parameters:s
– The location prefix.
logFooter | top |
The message that is logged to info
level
after the task has been successfully run.
- Setter method:
setLogFooter(String s)
parameters:s
– The footer message.- Default value:
- Empty (no footer message is logged.)
- See also:
- logHeader
logHeader | top |
The message that is logged to info
level
before the task is run.
- Setter method:
setLogHeader(String s)
parameters:s
– The header message.- Default value:
- A task class specific message.
- See also:
- logFooter
reportLevel | top |
This property is used to change the Report level for all task created by this task factory. The report level is changed for the thread running the task when the it is run, and is restored to its previous level when the it is done.
- Setter method:
setReportLevel(Level l)
Set the report levelparameters:l
– The new report level.
source (required) | top |
The entity to add to the catalog. If the task is run standalone, it is added to the catalog with its name as the system ID. If the task's SourceConfigurable.setRelativeToBase(org.entityfs.el.RelativeLocation) property is set (if the task is run by an RecursiveActionTF), the entity is saved in the catalog with a system ID relative to the base location.
It is up to the XmlCatalogResolver to interpret the entity object. It is usually done with InterpretAsReadableFileStrategy (depends on the resolver's configuration).
- Setter method:
setSource(Object o)
parameters:o
– An entity.- See also:
- locationPrefix
traceLogging | top |
If trace logging is enabled for a task, it reports its configuration before it is run.
Trace logging may also be enabled globally for all tasks by calling TraceMode.setTraceMode(boolean).
- Setter method:
setTraceLogging(boolean b)
Enable or disable trace logging.parameters:b
– Enable trace logging?
xmlCatalog (required) | top |
The catalog to add the entity to.
- Setter method:
setXmlCatalog(XmlCatalog c)
parameters:c
– The XML catalog.
Examples
Example 1
Add system ID-based entities to an XML catalog
JavaScript
* An EntityFS-aware task is implemented using EntityFS. This means that it uses the filter settings of DirectoryView:s and also that it often can work with other file system implementations than File-based, such as the RAM file system.