### 6 REMOTE DOCUMENT SERVERS

This section explains how a remote document server is specified and the role it performs.

#### 6.1 Specifying a Document Server

If HTX detects that a document has been referenced but cannot find it locally (see §4.4), it will generate a reference to a remote document server in place of a link to the local document. The URL it generates in this case takes the form:

\$HTX_SERVER/docname.htx/some_file.html?xref_label

That is, it replaces any directory path at the start of the URL with the URL of a remote document server, obtained by translating the HTX_SERVER environment variable. It also replaces “#xref_” with “?xref_” so that the server will receive the label field of the URL as a query string which it can interpret.

You may set the HTX_SERVER environment variable to identify any document server you like (for instance, one that you write yourself). However, if you do not specify one explicitly, the default is to use the Starlink HTX document server at RAL, whose URL is: