1.4. Element copyProcessResources

<copyProcessResources
  resources = anyURI | @anyURI | Glob pattern
  to = Path
  name = NMTOKEN
>
  Content: [ info ]?
</copyProcessResources>

<info>
  Not documented.
</info>

Copy resources needed by the process to the specified location. Typically, these resources are images needed by the XSLT style sheet.

Attributes:

resources

Specifies which resources to copy.

If the value of the resources attribute is a relative URL, it is relative to the directory containing the configuration file.

Wildcards, for example xsl/images/*.png, are supported only if the value of the resources attribute is a file: URL (after resolving this URL against the URL of the configuration file)

It is recommended to specify multiple resources using the notation @list-in-a-text-file, for example @xsl/images/list.txt. This mechanism works even the configuration file is located on a remote server.

The URI specified in this attribute may be also resolved using XML catalogs.

Format of list-in-a-text-file

Such text files should be encoded in UTF-8.

The paths contained in such files should be separated by newline characters ('\n'). Open lines and lines starting with '#' are ignored.

Relatives paths are relative to the location of the text file.

Example:

# This is a comment.
resources/basic.css

resources/attention.png
resources/caution.png
resources/tip.png
to

Specifies the destination file. If the value of the resources attribute specifies multiple resources, this destination must be an existing directory.

name

Giving a name to a process resource allows to easily replace it by a custom one. When a name attribute has been specified, the value of the resources attribute is preferably taken from the system property called "process_command_name.resource.name", if such system property exists and is not empty.

DocBook 5 example: process command db5.toHTMLHelp is specified as follows:

  <command name="db5.toHTMLHelp">
    <process>
      <subProcess name="db5.convertStep1" />

      <copyProcessResources resources="xsl/css/htmlhelp.css"
                            to="htmlhelp.css" name="css" />

      <transform stylesheet="xsl/htmlhelp/htmlhelp.xsl"
      ...    
   </process>
 </command>

Therefore defining system property db5.toHTMLHelp.resource.css allows to replace the stock htmlhelp.css by a custom CSS style sheet. Example:

<property name="db5.toHTMLHelp.resource.css" url="true">fancy.css</property>

(Remember that a system property can defined in a configuration file by using the property configuration element. See Section 20, “property” in XMLmind XML Editor - Configuration and Deployment.)