> For the complete documentation index, see [llms.txt](https://docs.atfinity.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.atfinity.io/document-xml-adx/adx-elements/include.md).

# Include

The `<include>` element allows you to include external ADX templates into your document. This is useful for reusing common template definitions (like headers, footers, or style definitions) across multiple documents.

The included template is rendered and its defined `<template>` and `<style>` elements become available in the current document.

## Example

```xml
<adx>
  <include template="shared_headers" />
  <body template="letterhead">
    <text>Document content here...</text>
  </body>
</adx>
```

In this example, the `shared_headers` template (defined elsewhere in the Atfinity system) is included, making its page templates and styles available for use in the body.

## Attributes

#### `template` (required)

The identifier of the template to include. This references a template defined in the Atfinity system.

## Usage Notes

* `<include>` must be placed directly under the root `<adx>` element
* Multiple `<include>` elements can be used to include several templates
* Included templates contribute their `<pageTemplates>` and `<styles>` to the current document
* The order of inclusion matters if templates define elements with the same identifiers

## Example with Multiple Includes

```xml
<adx>
  <include template="company_styles" />
  <include template="legal_disclaimers" />
  <body template="legal_letter">
    <text>This document uses styles and templates from both includes.</text>
  </body>
</adx>
```

<details>

<summary></summary>

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.atfinity.io/document-xml-adx/adx-elements/include.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
