7. documentResources
Prev | Chapter 7. Configuration elements | Next

## 7. documentResources

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

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

    <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.

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 `resource`s. The `class` element contains the name of a Java™ class which implements `com.xmlmind.xml.sxpath.XNodeSelector`.

XHTML example:

      <cfg:documentResources xmlns="">
        <cfg:resource path="//img/@src" />
        <cfg:resource path="//object/@data" />
      </cfg:documentResources>

DocBook example:

      <cfg:documentResources xmlns="">
        <cfg:resource path="//@fileref" />
      </cfg:documentResources>

Prev | Up | Next
6. detect | Home | 8. elementTemplate