# <Targets>

The Targets element specifies which anchors can be targets of links from other documents and their stored format within the document. These options require version 4.1 or later of iSiloX and iSiloXC.

## Full element example

        <Targets>
          <Export                   value="all"/>
          <ByFile>c:\Docs\export.htm</ByFile>
          <Lookup                   value="ByName"/>
          <GenerateMapFile          value="yes"/>
          <MapFile>c:\Docs\DocumentX.map</MapFile>
        </Targets>

## Sub-element summary

Tag | Type | Default | Description
--- | --- | --- | ---
`<Export>` | value | none | Which anchors to export.
`<ByFile>` | string | n/a | Path of HTML file with anchors to export.
`<Lookup>` | value | ByName | Format of stored targets.
`<GenerateMapFile>` | value | no | Whether to generate a map file for the exported anchors.
`<MapFile>` | string | n/a | Path to which to save the map file.

## Sub-element descriptions

### <Export>

Description
Set the value attribute of the `<Export>` tag to one of the following:

- `none`: Do not export any targets.
- `all`: Export all anchors as targets.
- `ByFile`: Export any anchors that are targets of hyperlinks in the HTML file whose path is given by the `<ByFile>` tag.

Note that setting the attribute value of the `<Export>` tag to `none` does not mean that other documents can not link externally to this document. Other documents can still link to this document using targets specified with offsets. It just means that no map file will be generated and neither name nor ID information for export targets will be stored.

See the section below about the `<Lookup>` tag for an explanation of the different ways that a document can link to an external document.

Examples
This example specifies to not export any targets.

      <Export                   value="none"/>

This example specifies to export all targets.

      <Export                   value="all"/>

This example specifies to export only targets of links in the HTML file whose path is given by the `<ByFile>` tag.

      <Export                   value="ByFile"/>

### <ByFile>

Description
When settings the value attribute of the `<Export>` tag to `ByFile`, specify the path of the HTML file between the `<ByFile>` start tag and the `</ByFile>` end tag. By doing so, only targets of links in the specified HTML file will be exported.

The path of the file can be an HTTP URL.

Examples
This example specifies the path of a file on the local hard drive.

      <ByFile>c:\Docs\export.htm</ByFile>

This example specifies an HTTP URL path for the file.

      <ByFile>http://www.acme.com/docs/ACMEExports.htm</ByFile>

### <Lookup>

Description
Set the value attribute of the `<Lookup>` tag to one of the following to determine the stored format of exported targets:

- `ByName`: The URL of an anchor relative to the first source is stored as the target name of the anchor.
- `ByID`: A numeric value, also known as the target ID, that uniquely identifies each exported target is stored and used to identify the target location within the document. A map file for the linking external document is needed to lookup the target ID values of the document during conversion.
- `ByOffset`: Using this option presumes that external documents that link to this document specify a numeric value, also known as the target offset, that represents the location of the desired target in the document, when jumping to the given target in the document. The document does not need to store any additional exported target information in this case. However, a map file for the linking external document is needed to lookup the target offset values of the document during conversion.

The stored format of exported targets of a document determines the method that other documents must use to link externally to the document. See the `<Lookup>` sub-element of the `<LinkOptions>` element for more information on how a target lookup occurs when a jump occurs to an external document.

Examples
This example specifies that external links to the document will be by name.

      <Lookup                   value="ByName"/>

This example specifies that external links to the document will be by ID.

      <Lookup                   value="ByID"/>

This example specifies that external links to the document will be by offset.

      <Lookup                   value="ByOffset"/>

### <GenerateMapFile>

Description
Set the value attribute of the `<GenerateMapFile>` tag to `no` to not generate a map file or to `yes` to generate a map file. A map file contains the information about the exported targets of the document that is needed for converting other documents that externally link to the document.

Examples
This example specifies that a map file should not be generated.

      <GenerateMapFile          value="no"/>

This example specifies that a map file should be generated.

      <GenerateMapFile          value="yes"/>

### <MapFile>

Description
When setting the value attribute of the `<GenerateMapFile>` tag to `yes`, then within the `<MapFile>` start tag and the `</MapFile>` end tag, specify the full path name to which to write the map file.

In a document that links to this document, you would normally specify the path of the generated map file using the `<MapFile>` sub-element of the `<LinkOptions>` element.

Example
This example specifies the full path of the file to which to write the map file.

          <MapFile>c:\Docs\DocumentX.map</MapFile>

©1999-2017 DC & Co. All rights reserved.