> For the complete documentation index, see [llms.txt](https://onestopconcept.gitbook.io/open-endpoints/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://onestopconcept.gitbook.io/open-endpoints/configuration/data-source-transformation/load-parameter-values-as-a-data-source.md).

# Load Parameter Values as a Data Source

The beauty of \<OpenEndpoints/> is its potential to produce custom content on demand. Practically, that means: Data submitted from a webform (or any other method of submitting data) can directly influence

* what content is loaded from which data sources
* what exactly to transformation of a content shall look like.

Endpoint parameters come from the following sources:

1. Parameters submitted from the originating request to the endpoint including, but not limited to, ?x=y GET parameters
2. The result of a parameter transformation (for example, extracting parameters from arbitrary XML sent as a POST)
3. An "intermediate value" generated by one task and consumed by future items (for example, results from an HTTP request which was sent during the processing)

This data source type will output all available parameter values and make it available for data-source transformation.

```xml
<!-- Definition of data source -->
<data-source>
    <parameters/>
</data-source>
```

The generated content looks like this:

```xml
<!-- Data generated by the data source -->
<transformation-input>
    <parameters>
        <parameter name="foo" value="abc"/>
        <parameter name="long" value="def"/>
    </parameters>
</transformation-input>
```

A special type of parameter value is an uploaded file. For example if you are submitting data from a webform which has `<input type="file" name="my-upload"/>`, then the presentation of input depends on the type of uploaded content.

If the uploaded content can be parsed as XML, this xml will be available in the data-source:

```xml
<!-- Data generated by the data source -->
<transformation-input>
    <parameters>
        <parameter name="foo" value="abc"/>
            <file-upload field-name="bar" upload-filename="foo.xml">
                <xyz>
                    <!-- whatever is in uploaded file -->
                </xyz>
            </file-upload>
        <parameter name="long" value="def"/>
    </parameters>
</transformation-input>
```

If the uploaded content can not be parsed as XML, the output is:

```xml
<!-- Data generated by the data source -->
<transformation-input>
    <parameters>
        <parameter name="foo" value="abc"/>
        <file-upload field-name="photo" upload-filename="photo.jpg"/>
        <parameter name="long" value="def"/>
    </parameters>
</transformation-input>
```

{% hint style="info" %}
**XML content <> xml-file-extension**

Whether a file upload is XML or not is determined by whether the XML can be parsed as XML. The uploaded filename and Content Type are ignored, to allow files such as SVGs which have neither an XML file extension, nor an XML Content Type.
{% endhint %}

**Intermediate parameters** are not regular endpoint parameters, i.e. they are not defined as a \<parameter> in endpoints.xml and their value does not come from the original request. Intermediate outputs are generated from tasks that execute during the processing of the request. On forwarding an endpoint to another endpoint those parameters will be made available in the parameters-data-source as well:

```xml
<!-- Data generated by the data source -->
<transformation-input>
    <parameters>
        ...
        <intermediate-value name="xyz" value="something"/>
        ...
    </parameters>
</transformation-input>
```

By default the root-tag of the generated output is \<parameters>. Use the optional **tag attribute** to generate any different root-tag:

```xml
<!-- Definition of data source -->
<data-source tag="my-new-root-tag">
    <parameters/>
</data-source>
```


---

# 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://onestopconcept.gitbook.io/open-endpoints/configuration/data-source-transformation/load-parameter-values-as-a-data-source.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.
