9. documentResources

<documentResources>
  Content: [ resource|selector ]+
</documentResources>

<resource>
  path = Absolute XPath (subset)
  kind = NMTOKEN
/>

<selector>
  <class>Content: Java class name</class>
</selector>

Specifies which resources are logically part of the document being edited. Generally these resources are external image files.

Attributes of child element resource:

path

XPath expression used to find the URIs of the resources within the document content. These URIs are generally attribute values but could also be element values.

kind

Specifies the kind of resources (image, video, audio, etc) selected by the XPath expression.

The value of this attribute may be referenced in the include or exclude attributes of element process/copyDocument/resources in XMLmind XML Editor - Commands. This allows to specify whether a document resource should be ignored, copied or converted, depending on the kind of this resource.

In complex cases, specifying document resources using simple XPath expressions (see XPath subset below) is not sufficient. In such case, use selector child elements instead of resources. The class element contains the name of a Java™ class which implements com.xmlmind.xml.save.ResourceSelector.

DITA example:

<cfg:documentResources xmlns="">
  <cfg:resource path="//image/@href"/>
  <cfg:resource path="//coderef/@href"/>
</cfg:documentResources>

DocBook example:

<cfg:documentResources xmlns="">
  <cfg:resource kind="image" path="//imagedata/@fileref"/>
  <cfg:resource kind="image" path="//graphic/@fileref"/>
  <cfg:resource kind="image" path="//inlinegraphic/@fileref"/>
  <cfg:resource kind="text" path="//textdata/@fileref"/>
  <cfg:resource kind="audio" path="//audiodata/@fileref"/>
  <cfg:resource kind="video" path="//videodata/@fileref"/>
</cfg:documentResources>