XRechnung

Overview

In the XRechnung administration panel, you will encounter the following key components:

1. Transformation

Purpose

The Transformation process is essential for converting raw data, usually in XML format, into a structured format that meets specific requirements, like generating an invoice. In XRechnung, this is primarily achieved using XSLT (Extensible Stylesheet Language Transformations). XSLT is a language designed for transforming XML documents into other types of documents, like another XML, HTML, or plain text.

How It Works

• XSLT Template: The XSLT file defines how the XML data is processed and what the final output should look like. It applies rules and templates to extract, manipulate, and output the data from the XML document.

• Elements and Attributes: The XSLT file contains specific elements and attributes that control the transformation process. For instance, <xsl:value-of> is used to extract the value of a specific node from the XML document.

Admin Capabilities

• Modifying the XSLT:

• Edit Existing Templates: An admin can modify the existing XSLT templates to change how the input XML data is transformed. For example, if there’s a need to extract additional information from the XML document, an admin could add new rules in the XSLT file.

• Create New Versions: If changes are required, an admin can create a new version of the XSLT template. This ensures that previous versions remain intact for historical reference or rollback if needed.

Example:

Suppose the XSLT template extracts the invoice ID using:

<xsl:value-of select="//INVOICE/INVOICE_ID/text()" />

If a new field, such as a customer reference number, needs to be extracted, an admin might add:

<xsl:value-of select="//INVOICE/CUSTOMER_REFERENCE_NUMBER/text()" />

2. Preview

Purpose

The Preview function allows admins to view the output generated by the XSLT transformation before finalizing it. This step is crucial for ensuring that the transformation rules work correctly and that the output meets the required standards.

How It Works

• Real-Time Validation: The preview feature provides a real-time rendering of how the transformed data will look when applied to an actual document (like an invoice). This helps in catching errors or formatting issues early.

• Adjustments: If the preview shows discrepancies or errors, adjustments can be made directly in the transformation (XSLT) file.

Admin Capabilities

• Customizing the Preview:

• Modify Preview Settings: An admin can adjust which parts of the transformation are previewed. For instance, they might focus on specific sections of the document or test new rules added to the XSLT template.

• Save and Iterate: After making adjustments, the preview can be refreshed to see the changes. This iterative process allows fine-tuning until the desired output is achieved.

Example:

If an admin notices that the date format in the preview is incorrect (e.g., showing YYYY-MM-DD instead of DD-MM-YYYY), they can modify the XSLT to format the date correctly and immediately see the result in the preview.

3. Extraction Paths

Purpose

Extraction Paths define the specific paths within an XML or JSON structure from which data should be extracted. This process is essential for isolating key pieces of information within the document that will be used in the transformation or for other processing tasks.

How It Works

• XPath and JSONPath: Extraction paths use languages like XPath (for XML) or JSONPath (for JSON) to specify the location of the data within the document. These paths are crucial in telling the system exactly where to find and how to extract the required information.

Admin Capabilities

• Defining and Modifying Paths:

• Modify Existing Paths: An admin can modify the extraction paths if the data structure changes or if additional data needs to be extracted. This might involve changing the XPath or JSONPath expressions.

• Add New Paths: For new fields or data points, an admin can define new extraction paths. This would involve specifying the correct path in the XML or JSON document.

Example:

In an XML invoice document, if the path to the invoice ID is defined as:

"invoice_id": "//INVOICE/INVOICE_ID/text()"

And a new field, such as a shipping address, needs to be added, an admin might add:

"shipping_address": "//INVOICE/SHIPPING/ADDRESS/text()"

Last updated