---
title: "Generator: ProcessContentFileAuto"
source: https://dev.pageseeder.com/reference/advanced/website/berlioz/generators/org.weborganic.bastille.psml.ProcessContentFileAuto.html
last_updated: 2026-08-07T17:09:54+10:00
tokens: ~607
---

# Generator: ProcessContentFileAuto

| Property | Value |
| --- | --- |
| Class name: | org.weborganic.bastille.psml.ProcessContentFileAuto |
| Version: | 0.7.7 - 25 October 2012 |
| Library: | Bastille |
| Cacheable: | Yes |
| Generated: | 2012-12-21 |

## Description

This generator returns the content of a PSML file using the Berlioz path from content folder and processes transclusions.

This generator behaves exactly the same as the [Generator: GetContentFileAuto](org.weborganic.bastille.psml.GetContentFileAuto.md) generator, except that it transcludes documents inline inside block xrefs of type ‘transclude’.

> **Note:** This generator does not *yet* support transcluded content and this version transcludes the entire document regardless of the fragment.

 If the `<blockxref>` element has a level element, the heading levels are adjusted accordingly.

### Configuration

No configuration is required.

The root of the PSML folder can be configured using the global property `bastille.psml.root` which can be either an absolute path or a relative path from the global repository.

By default, the PSML root is set to `psml` which usually corresponds to the `/WEB-INF/psml` folder of your Web app.

### Parameters

This generator does not accept or require any parameter.

### Returned XML

Like most PSML generators returning a PSML file, this generator wraps the content of the file with the `<psml-file>` element.

The `@base` attribute is the relative path from the PSML root to the folder. Since references (xrefs and image sources) in PSML are relative, this attribute can be used to construct the path to images or cross-referenced documents.

See the following:

```xml

<psml-file name="[file name]" base="[base path]" status="[status]">
  <!-- PSML content -->
</psml-file>
```

Transcluded content looks like:

```xml

<blockxref type="transclude" href="" ... >
  <document>
    <!-- transcluded PSML content -->
  </document>
</blockxref>
```

### Error handling

If the file cannot be found or read, this generator returns the following:

```xml

<psml-file name="[file name]" base="[base path]" status="not-found">
 Unable to find file: [path]
</psml-file>
```

The status of this generator is set to ‘NOT\_FOUND’.

### Usage

Following is the code to include in the [services](../configuration/services.md):

```xml

<generator class="com.weborganic.bastille.psml.ProcessContentFileAuto" ... />
```

