Documentation
  • Introduction
  • Installation
    • Docker Container
      • Database
      • Deployment Modes
      • Docker Environment Variables
      • Deploy on AWS
      • Deploy on Digital Ocean
    • First Steps After Installation
      • Add New Application
      • Publish Application
      • Use Application
  • Usage
    • Send Request To Endpoint
    • Request From Web Form
    • Web Form Controls Having Multiple Values
    • Web Form With File Upload
    • HTML Snippet embedded with Java Script
    • Authentication
    • Environments
    • Debug Mode
  • Configuration
    • Application Directory Structure
      • endpoints.xml
      • security.xml
      • email-sending-configuration.xml
      • service-portal-endpoint-menu-items.xml
      • Directory: data-source-post-processing
      • Directory: data-sources
      • Directory: data-source-xslt
      • Directory: fonts
      • Directory: http-xslt
      • Directory: parameter-xslt
      • Directory: static
      • Directory: transformers
      • Directory: xml-from-application
    • Endpoint Parameter
    • Types of Endpoints
      • Endpoint to Return XSLT Transformation
      • Endpoint to Return Content From Url
      • Endpoint to Return Static File
      • Endpoint to Return OOXML
      • Endpoint to Redirect Request
      • Forwarding Between Endpoints
      • Conditional Success Action
      • Error Case
    • Data Source Transformation
      • Load Parameter Values as a Data Source
      • Load Data From a Local XML File
      • Load Data from any REST-API
      • Load Data From Databases
      • List AWS S3 keys
      • Load AWS S3 object
      • Additional Useful Data Source Types
      • Transformation Options
      • Data Source Post-Processing
      • Using Parameter Placeholders in Data Sources
      • On-Demand Incrementing Number
      • Writing Transformation Input/Output to AWS S3
    • Parameter Transformation
      • Parameter Transformation Input
      • Parameter Transformation Output
    • Tasks
      • HttpRequest Task
      • Email Task
      • Create Shortlink Task
      • Request Log Task
      • Conditional Tasks
      • Parallel or Subsequent Execution of Tasks
      • Intermediate Values
    • PDF Created With XSLT
      • Embedding Fonts
      • Embedding Images
    • OpenEndpoints XSLT Specifics
Powered by GitBook
On this page
Export as PDF
  1. Configuration
  2. Data Source Transformation

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.

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

The generated content looks like this:

<!-- 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:

<!-- 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:

<!-- 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>

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.

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:

<!-- 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:

<!-- Definition of data source -->
<data-source tag="my-new-root-tag">
    <parameters/>
</data-source>
PreviousData Source TransformationNextLoad Data From a Local XML File

Last updated 2 years ago