9. checkExternalRefs

No parameter.

Checks all the links to external resources found in the document being edited. All kinds of external resources are checked for existence: images, audio, video, PDF documents, HTML pages, etc.

When the resource is an HTML page and the link ends with a fragment (e.g. "#bar" in "../doc/foo.html#bar") then this fragment is also checked for existence:

A property called "configuration_name checkExternalRefs" must be defined for this command to work. This is done by the means of the property in XMLmind XML Editor - Configuration and Deployment configuration element.

This multi-line property is used to specify which elements or attributes are links to external resources. Syntax:

spec -> [ namespace_prefix ]* & [ xpath ]* & [ directive ]?

namespace_prefix -> 'xmlns:' prefix '=' namespace \n

xpath -> expression_selecting_elements_or_attributes \n

directive -> '+documentResources' \n

Directive +documentResources adds all the XPath expressions found in configuration element documentResources in XMLmind XML Editor - Configuration and Deployment to the list of XPath expressions directly specified in the "$c checkExternalRefs" property.

Example 6.3. XHTML checkExternalRefs property
<property name="$c checkedExternalRefs">
  +documentResources

  xmlns:h=http://www.w3.org/1999/xhtml
  //h:a/@href
  /h:html/h:head/h:base/@href
</property>
Example 6.4. DITA checkExternalRefs property
<property name="$c checkedExternalRefs">
  //xref[@scope="external"]/@href
  +documentResources
</property>
Example 6.5. TEI Lite checkExternalRefs property
<property name="$c checkedExternalRefs">
  xmlns:tei=http://www.tei-c.org/ns/1.0
  //tei:ref/@target[not(starts-with(., '#'))]
  //tei:ptr/@target[not(starts-with(., '#'))]

  +documentResources
</property>
Example 6.6. DocBook 5+ checkExternalRefs property
<property name="$c checkedExternalRefs">
  xmlns:db=http://docbook.org/ns/docbook
  xmlns:xlink=http://www.w3.org/1999/xlink
  //db:link/@xlink:href
  +documentResources
</property>