﻿<?xml version="1.0" encoding="utf-8" ?>
<xs:schema xmlns="http://schema.webpdf.de/1.0/configuration/application" elementFormDefault="qualified"
           targetNamespace="http://schema.webpdf.de/1.0/configuration/application"
           xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="application">
        <xs:annotation>
            <xs:documentation>
                <p>The application element defines settings for the web services and the portal page. Some of these changes might require a server restart to take effect.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:all>
                <xs:element name="webservices">
                    <xs:annotation>
                        <xs:documentation>
                            <p>The web services element defines settings for the web service endpoints.</p>
                        </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                        <xs:all>
                            <xs:element name="converter" type="ConverterWebserviceType" minOccurs="0"/>
                            <xs:element name="ocr" type="OcrWebserviceType" minOccurs="0"/>
                            <xs:element name="pdfa" type="PdfaWebserviceType" minOccurs="0"/>
                            <xs:element name="barcode" type="BarcodeWebserviceType" minOccurs="0"/>
                            <xs:element name="urlconverter" type="UrlConverterWebserviceType" minOccurs="0"/>
                            <xs:element name="toolbox" type="ToolboxWebserviceType" minOccurs="0"/>
                            <xs:element name="signature" type="SignatureWebserviceType" minOccurs="0"/>
                        </xs:all>
                    </xs:complexType>
                </xs:element>
                <xs:element name="portal" type="PortalType">
                    <xs:annotation>
                        <xs:documentation>
                            <p>The portal element defines settings for the portal page of the server.</p>
                        </xs:documentation>
                    </xs:annotation>
                </xs:element>
                <xs:element name="bridges">
                    <xs:annotation>
                        <xs:documentation>
                            <p>The bridges element defines settings for the bridges (to other applications) used by the server. Such bridges are mostly used, to provide the Converter web service with instruments for a native and more accurate PDF conversion of specific file formats.</p>
                            <p>
                                <b>Important:</b>
                                Be aware that activating such a bridge requires the application to be installed and correctly configured on the server side. (Refer to the user manual for further information.)
                            </p>
                        </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                        <xs:all>
                            <xs:element name="office" type="OfficeBridgeType" minOccurs="0">
                                <xs:annotation>
                                    <xs:documentation>
                                        <p>Defines the settings for the MS Office Bridge. The Office Bridge can be used as an alternative (to the built-in conversion) for converting Office documents. The Office Bridge requires a local installation of MS Office on the server and works only on Windows.</p>
                                    </xs:documentation>
                                </xs:annotation>
                            </xs:element>
                            <xs:element name="sharePoint" type="SharePointBridgeType" minOccurs="0">
                                <xs:annotation>
                                    <xs:documentation>
                                        <p>Defines the settings for the SharePoint Bridge. The SharePoint Bridge can be used as an alternative (to the built-in conversion) for converting Office documents. The SharePoint Bridge uses SharePoint Online and therefore requires the corresponding Microsoft 365 service and a registered application on the Microsoft identity platform</p>
                                    </xs:documentation>
                                </xs:annotation>
                            </xs:element>
                            <xs:element name="chromium" type="ChromiumBridgeType" minOccurs="0">
                                <xs:annotation>
                                    <xs:documentation>
                                        <p>Defines the settings for the Chromium bridge. The Chromium bridge is used for converting emails and HTML documents.</p>
                                    </xs:documentation>
                                </xs:annotation>
                            </xs:element>
                        </xs:all>
                    </xs:complexType>
                </xs:element>
                <xs:element name="license" type="LicenseType" minOccurs="0">
                    <xs:annotation>
                        <xs:documentation>
                            <p>Defines the license to be used for the server.</p>
                        </xs:documentation>
                    </xs:annotation>
                </xs:element>
                <xs:element name="keystore" type="KeystoreType" minOccurs="0">
                    <xs:annotation>
                        <xs:documentation>
                            <p>Defines the global keystore used by the server. This keystore is used to store globally available certificates (e.g. for usage in the signature web service).</p>
                        </xs:documentation>
                    </xs:annotation>
                </xs:element>
                <xs:element name="tsa" type="TsaType" minOccurs="0">
                    <xs:annotation>
                        <xs:documentation>
                            <p>Defines a TSA (Time Stamp Authority which supports <a
                                    href="https://www.ietf.org/rfc/rfc3161.txt">RFC3161</a>) that shall be used by the server (e.g. when signing documents).
                            </p>
                        </xs:documentation>
                    </xs:annotation>
                </xs:element>
                <xs:element name="proxies" minOccurs="0">
                    <xs:annotation>
                        <xs:documentation>
                            <p>Defines proxy servers that shall be known to and used by the server to access external resources.</p>
                        </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="proxy" type="ProxyType" minOccurs="0" maxOccurs="unbounded"/>
                        </xs:sequence>
                        <xs:attribute name="useSystemProxies" default="false" type="xs:boolean">
                            <xs:annotation>
                                <xs:documentation>
                                    <p>When enabled, proxy settings are automatically read from the operating system instead of using manually configured proxies.</p>
                                    <p>Supported sources:</p>
                                    <ul>
                                        <li>
                                            <b>Windows:</b>
                                            System proxy settings (Internet Settings via Java ProxySelector)
                                        </li>
                                        <li>
                                            <b>Linux:</b>
                                            Environment variables (HTTP_PROXY, HTTPS_PROXY, NO_PROXY)
                                        </li>
                                        <li>
                                            <b>All platforms:</b>
                                            Java system properties (http.proxyHost, http.proxyPort, etc.)
                                        </li>
                                    </ul>
                                    <p>
                                        <b>Important:</b>
                                        <ul>
                                            <li>
                                                When useSystemProxies is enabled, all manually configured proxy entries in this section are ignored.
                                                This is an exclusive setting - either system proxies OR manual proxies are used, not both.
                                            </li>
                                            <li>
                                                To read the settings from the Windows registry, the JVM option <code>-Djava.net.useSystemProxies=true</code> must be set.
                                            </li>
                                        </ul>
                                    </p>
                                    <p>
                                        <b>Limitations:</b>
                                        PAC (Proxy Auto-Config) files and WPAD (Web Proxy Auto-Discovery) are not supported. Only basic proxy configurations (host, port, bypass list) are read from the system.
                                    </p>
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>
                <xs:element name="metrics" type="MetricsType" minOccurs="0">
                    <xs:annotation>
                        <xs:documentation>
                            <p>Defines the configuration for collecting and exporting application metrics using the Micrometer framework.</p>
                            <p>Metrics are collected across multiple architectural layers:</p>
                            <ul>
                                <li>
                                    <b>HTTP Layer</b>: Measures complete HTTP request lifecycle including authentication and routing
                                </li>
                                <li><b>API Layer</b>: Tracks REST endpoint execution time and request counts
                                </li>
                                <li>
                                    <b>Service Layer</b>: Monitors the execution of business logic (web service operation) in terms of duration and invocations
                                </li>
                                <li>
                                    <b>Thread Pool Layer</b>: Tracks thread pool (web service instances) utilization and queue depth
                                </li>
                                <li><b>JVM Layer</b>: Collects Java Virtual Machine metrics (memory, GC, threads)
                                </li>
                                <li><b>System Layer</b>: Monitors system resources (CPU, disk, file descriptors)
                                </li>
                            </ul>
                            <p>Metrics can be exported to Prometheus and/or JMX for monitoring and visualization in tools like Grafana.</p>
                        </xs:documentation>
                    </xs:annotation>
                </xs:element>
            </xs:all>
        </xs:complexType>
    </xs:element>
    <xs:complexType name="LicenseType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the license to be used for the server.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="key" default="">
            <xs:annotation>
                <xs:documentation>
                    <p>License key. Divided into five parts, each part delimited by a minus sign. Each part has six characters.</p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:string"/>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="licensee" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Name of the licensee. Is used in conjunction with the license key. Notation is important.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="WebserviceType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines a set of options for all web services.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="enabled" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If enabled, then the web service is activated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="instances" default="2">
            <xs:annotation>
                <xs:documentation>
                    <p>Number of parallel instances (threads) for the web service. Defines the number of requests that can be executed in parallel before requests are queued.</p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="1"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="maxLatency" default="180">
            <xs:annotation>
                <xs:documentation>
                    <p>Maximum allowed time in seconds for the execution of a web service request (job) before the request is canceled.
                        If the time has expired, the execution is aborted and an error code is returned.
                    </p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="0"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="queueSize" default="100" type="xs:int">
            <xs:annotation>
                <xs:documentation>
                    <p>Maximum number of waiting requests, before new requests are rejected.
                        If there are more requests than free instances, they are placed in the queue.
                        If this maximum value is reached, further requests are rejected directly.
                        This setting only applies if <code>queueMode</code> is set to <code>MANUAL</code>.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="queueMode" default="AUTO" type="QueueModeType"/>
    </xs:complexType>
    <xs:complexType name="ConverterWebserviceType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines a set of options specific for the "Converter" web service.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="WebserviceType">
                <xs:attribute name="fontPath" default="" type="xs:string">
                    <xs:annotation>
                        <xs:documentation>
                            <p>Sets the base path (including subfolders) of the server from which to retrieve installed fonts.</p>
                            <p>If no value is specified, then the default font directories (including subfolders) of the respective operating system are used.
                                Under Windows this is usually <code>C:\Windows\Fonts</code> and under Linux <code>/usr/share/fonts/truetype</code>.
                            </p>
                            <p>
                                <b>Note:</b>
                                On Linux, the home directory of the user under which the server is running is also always used in addition.
                                The environment variable <code>user.home</code> with the subdirectory <code>.fonts</code> is used.
                            </p>
                            <p>
                                <b>Important:</b>
                                This setting is supported only by the built-in document converter OutsideIn.
                            </p>
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="defaultFont" default="" type="xs:string">
                    <xs:annotation>
                        <xs:documentation>
                            <p>Sets the default font to be used if the original font was not found and no matching character (for representation) was found in any other font with a similar font family or characteristic.
                                Therefore, a font should be used that has the widest possible coverage of characters, especially in the Unicode range.
                            </p>
                            <p>
                                <b>Note:</b>
                                If no font is specified, then the server tries to find a suitable font (such as "Arial Unicode MS" or "Go Noto Current").
                                If these fonts are not available, then the respective default font of the operating system (under Windows "Arial" and under Linux "DejaVu Sans") is used.
                                If these are not available either, then a corresponding message appears on the server console (or in the logs).
                            </p>
                            <p>
                                <b>Important:</b>
                                This setting is supported only by the built-in document converter OutsideIn.
                            </p>
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="OcrWebserviceType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines a set of options specific for the "OCR" web service.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="WebserviceType"/>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="BarcodeWebserviceType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines a set of options specific for the "Barcode" web service.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="WebserviceType"/>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="UrlConverterWebserviceType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines a set of options specific for the "URL Converter" web service.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="WebserviceType">
                <xs:attribute name="timeout" default="60000" type="xs:int">
                    <xs:annotation>
                        <xs:documentation>
                            <p>Sets a timeout in seconds, that shall be used for the HTTP request to get the URL.</p>
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="userAgent"
                              default="Mozilla/5.0 (Windows; U; Windows NT 6.1; de-DE) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.1 Safari/532.4"
                              type="xs:string">
                    <xs:annotation>
                        <xs:documentation>
                            <p>Sets the text for the user agent to send to the destination server from which the URL is to be retrieved.</p>
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="SignatureWebserviceType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines a set of options specific for the "Signature" web service.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="WebserviceType"/>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="ToolboxWebserviceType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines a set of options specific for the "Toolbox" web service.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="WebserviceType"/>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="PdfaWebserviceType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines a set of options specific for the "PDFA" web service.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="WebserviceType">
                <xs:attribute name="fontPath" default="" type="xs:string">
                    <xs:annotation>
                        <xs:documentation>
                            <p>Sets the base path of the server from which to retrieve installed fonts.</p>
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType id="keystoreId" name="KeystoreType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines settings for the global keystore used by the server. This keystore is used to store globally available certificates (e.g. for usage in the signature web service).</p>
            </xs:documentation>
        </xs:annotation>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="entry" type="KeystoreEntryType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="filter" type="KeystoreFilterType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:choice>
        <xs:attribute name="type" default="NONE" type="GlobalKeystoreFormatType">
            <xs:annotation>
                <xs:documentation>
                    <p>The format of the keystore file.
                        <ul>
                            <li>NONE = Keystore not defined.</li>
                            <li>JKS = A Java keystore (file based with an extension like ".jks").</li>
                            <li>PKCS11 = A PKCS11 keystore (Smart cards, USB keys/token and hardware security modules (HSMs)).</li>
                            <li>PKCS12 = A PKCS12 keystore (file based with the extensions like ".p12" or ".pfx").</li>
                        </ul>
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="password" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The password required to access the keystore.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="KeystoreEntryType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines information about one entry of a keystore.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="alias">
            <xs:annotation>
                <xs:documentation>
                    <p>The alias under which the keystore entry was saved.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="password">
            <xs:annotation>
                <xs:documentation>
                    <p>The password of the keystore entry.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="KeystoreFilterType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines filters for the certificates used from the keystore.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="pattern" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Defines a filter pattern that allows the use of '*' and '?' wildcards.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="TsaType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines a TSA (Time Stamp Authority which supports <a
                        href="https://www.ietf.org/rfc/rfc3161.txt">RFC3161</a>) that shall be used by the server.
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="url" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The URL where the TSA can be reached.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="user" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The username required for authentication with the TSA.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="password" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The password required for authentication with the TSA.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="hashAlgorithm" default="SHA-1" type="TsaHashAlgorithm">
            <xs:annotation>
                <xs:documentation>
                    <p>The hashing algorithm used to check the validity of the timestamp.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="SharePointBridgeType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the settings for the SharePoint Bridge. The SharePoint Bridge can be used as an alternative (to the built-in conversion) for converting Office documents. The SharePoint Bridge uses SharePoint Online and therefore requires the corresponding Microsoft 365 service and a registered application on the Microsoft identity platform</p>
            </xs:documentation>
        </xs:annotation>
        <xs:all>
            <xs:element name="app" type="SharePointBridgeAppType" minOccurs="0"/>
            <xs:element name="site" type="SharePointBridgeSiteType" minOccurs="0"/>
        </xs:all>
        <xs:attribute name="enabled" default="false" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>When set to true the SharePoint Online bridge shall be enabled.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="OfficeBridgeType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the settings for the MS Office Bridge. The Office Bridge can be used as an alternative (to the built-in conversion) for converting Office documents. The Office Bridge requires a local installation of MS Office on the server and works only on Windows.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:all>
            <xs:element name="word" type="OfficeBridgeAppType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines settings specific for the MS Word application in the office bridge.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="excel" type="OfficeBridgeAppType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines settings specific for the MS Excel application in the office bridge.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="powerPoint" type="OfficeBridgeAppType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines settings specific for the MS PowerPoint application in the office bridge.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="visio" type="OfficeBridgeAppType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines settings specific for the MS Visio application in the office bridge.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:all>
        <xs:attribute name="enabled" default="false" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If enabled, then the MS Office bridge is activated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="useWord" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If enabled, then MS Word is usable via the Office bridge.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="useExcel" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If enabled, then MS Excel is usable via the Office bridge.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="usePowerPoint" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If enabled, then MS PowerPoint is usable via the Office bridge.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="useVisio" default="false" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If enabled, then MS Visio is usable via the Office bridge.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="showMessagesOnDebugView" default="false" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If enabled, then all debug messages of the Office Bridge will be visible in the Windows application
                        <a href="https://docs.microsoft.com/en-us/sysinternals/downloads/debugview">"SysInternals DebugView"</a>
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="ChromiumBridgeType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the settings for the Chromium bridge. The Chromium bridge is used for converting emails and HTML documents.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:all>
            <xs:element name="commandLine" type="ChromiumBridgeCommandLineType" minOccurs="0"/>
        </xs:all>
        <xs:attribute name="enabled" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If enabled, then the Chromium bridge is activated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="port" default="0" type="xs:int">
            <xs:annotation>
                <xs:documentation>
                    <p>The port on which Chromium should listen for requests.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="path" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets a custom base path for the Chromium application.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="hostAddress" default="localhost" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The IP address on which Chromium should be reachable.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="noSandbox" default="false" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets this option whether the Chromium process should run in a sandbox or not.</p>
                    <p>
                        <b>Important:</b>
                        Be aware that running Chromium outside a sandbox can be a security risk. Proceed with caution!
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="headlessMode" default="new" type="ChromiumBridgeHeadlessModeType">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the headless mode (for unattended environments) when the Chromium instance starts.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="ChromiumBridgeCommandLineType">
        <xs:annotation>
            <xs:documentation>
                <p>Allows you to define a list of command line switches that will be passed to the Chromium process. These values must be valid and fully declared switches that are passed unchanged to the Chromium process. Switches passed in this way have priority over all other defined switches.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="switch" type="ChromiumBridgeCommandLineSwitchType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="ChromiumBridgeCommandLineSwitchType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines a single command line switch for the Chromium process. This switch consists of a name for the switch and an associated value.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="name" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the name of the Chromium command line switch. The name must be spelled correctly (without "--" and in correct upper/lower case), because it will be used unchanged.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="value" type="xs:string">
            <xs:annotation>
                <xs:documentation>Defines the value of the Chromium command line switch. The value for the switch is used unchanged and must be escaped properly.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="mode" default="add" type="ChromiumBridgeCommandlineSwitchModeType">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the mode for the command line switch.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:simpleType name="ChromiumBridgeCommandlineSwitchModeType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the operation mode for the command line switch.
                    <ul>
                        <li>ADD = add the command line switch</li>
                        <li>REMOVE = remove the command line switch</li>
                    </ul>
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:enumeration value="add"/>
            <xs:enumeration value="remove"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="ChromiumBridgeHeadlessModeType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the different headless modes of the Chromium instance.
                    <ul>
                        <li>NEW = Uses the same code base for the Chromium headless instance as the normal non-headless browser.</li>
                        <li>OLD = Uses the old code base for the Chromium headless instance, which is different from the non-headless browser</li>
                    </ul>
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:enumeration value="old"/>
            <xs:enumeration value="new"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:complexType name="PortalUserInterfaceType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines settings for the user interface of the portal.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:all>
            <xs:element name="limits" type="PortalUserInterfaceLimitsType" minOccurs="0"/>
            <xs:element name="tooltips" type="PortalUserInterfaceTooltipsType" minOccurs="0"/>
        </xs:all>
    </xs:complexType>
    <xs:complexType name="PortalUserInterfaceLimitsType">
        <xs:attribute name="displayMaxFiles" default="false" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>Specifies whether the portal page should display the maximum number of up-loadable files on the screen.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="displayDiskSpace" default="false" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>Defines whether the portal page should display the maximum available disk space on the screen.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="PortalUserInterfaceTooltipsType">
        <xs:attribute name="showDelay" default="5" type="xs:int"/>
    </xs:complexType>
    <xs:complexType name="PortalFunctionsType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines which portal functions are enabled or disabled.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="showHelp" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>When set to true the portal page shall display help and info messages.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="uploadUrl" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the URL to PDF conversion is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="uploadFile" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "upload file" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="convertDocument" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If deactivated, then the "convert document" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="renameDocument" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "rename document" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="ocrConversion" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "OCR conversion" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="pdfaConversion" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "PDF/A conversion" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="rotatePages" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "rotate pages" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="deletePages" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "delete pages" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="extractPages" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "extract pages" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="extractContent" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "extract content" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="addWatermark" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "add watermark" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="exportAsImage" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "export as image" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="changeDocumentSettings" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "change document settings" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="changeDocumentView" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, the "change document view" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="encryptDocument" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "encrypt document" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="printDocument" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "print document" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="mergeDocument" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "merge document" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="splitDocument" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "split document" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="signDocument" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "sign document" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="createBarcode" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "create Barcode" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="detectBarcode" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "detect Barcode" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="editForms" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "edit forms" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="editAttachment" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "edit attachment" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="editAnnotation" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "edit annotation" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="editBackground" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "edit background" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="editTransitions" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "edit transitions" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="editBoxes" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "edit boxes" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="editHeaderFooter" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "edit header/footer" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="movePages" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "move pages" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="outline" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "edit outline" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="redact" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "redact" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="sanitize" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "sanitize" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="portfolio" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "portfolio" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="scalePages" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "scale pages" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="compress" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "compress" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="transcribeDocument" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If disabled, then the "transcribe document" dialog is deactivated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="NewsPanelType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines whether the portal displays a news page and where the content is loaded from.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element name="entry" type="NewsPanelEntryType"/>
        </xs:sequence>
        <xs:attribute name="contentRefreshInterval" default="3600">
            <xs:annotation>
                <xs:documentation>
                    <p>Interval in seconds at which the content should be reloaded.</p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="0"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="NewsPanelEntryType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines a source for the entries in the "news panel" of the portal page".</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="url" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>URL from which to load the content for the "news panel".</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="ProxyType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines a proxy server that shall be known to and used by the server to access external resources.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element name="nonProxyHost" type="ProxyNonHostType" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation>A list of host entries for which the proxy should be bypassed. Wildcards (`*`) are supported for pattern matching.</xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="scheme" default="http">
            <xs:annotation>
                <xs:documentation>
                    <p>The scheme to access the proxy server (currently only "http" or "https" are allowed).</p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="http"/>
                    <xs:enumeration value="https"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="host" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The address of the proxy server.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="port" default="8080">
            <xs:annotation>
                <xs:documentation>
                    <p>The port on which the proxy listens.</p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="0"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="userName" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The name of the user required to authenticate with the proxy server.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="password" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The password of the user required to authenticate with the proxy server.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="bypassProxyOnLocal" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>When enabled, the proxy will be bypassed for local addresses such as localhost, 127.0.0.1, [::1], and addresses without a dot (e.g., "intranet").</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="enabled" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>Enables or disables this proxy configuration. When disabled, the proxy will not be used even if configured.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="ProxyNonHostType">
        <xs:annotation>
            <xs:documentation>A list of host entries for which the proxy should be bypassed. Wildcards ('*') are supported for pattern matching.</xs:documentation>
        </xs:annotation>
        <xs:attribute name="host" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>A single host entry for which the proxy should be bypassed. Wildcards ('*') are supported for pattern matching.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="OfficeBridgeAppType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines settings specific for the MS Visio application in the office bridge.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="useExecutionTest" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If this option is enabled, the Office Bridge application is started in test mode when the server is initialized, which provides advanced debugging information.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="oleStartWaitTime" default="0">
            <xs:annotation>
                <xs:documentation>
                    <p>The time in seconds to wait for the OLE server to start during initialization.</p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="0"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="oleTerminationTimeout" default="0">
            <xs:annotation>
                <xs:documentation>
                    <p>The time in seconds to wait for the OLE server to terminate at shutdown.</p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="0"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="minExecutionTime" default="5000">
            <xs:annotation>
                <xs:documentation>
                    <p>The minimum time frame provided for the execution of an operation with the Office bridge.</p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="0"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="PortalType">
        <xs:annotation>
            <xs:documentation>
                <p>The portal element defines settings for the portal page of the server.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:all>
            <xs:element name="functions" type="PortalFunctionsType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines which portal functions are enabled or disabled.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="userInterface" type="PortalUserInterfaceType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines settings for the user interface of the portal.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="newsPanel" type="NewsPanelType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines whether the portal displays a news page and where the content is loaded from.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="settings" type="PortalSettingsType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines global settings for the web service calls made from the portal page.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="auth" type="PortalAuthType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines which settings apply for authentication to the portal.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:all>
    </xs:complexType>
    <xs:complexType name="PortalSettingsType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines global settings for the web service calls made from the portal page.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:all>
            <xs:element name="signature" minOccurs="0">
                <xs:complexType>
                    <xs:attribute name="signatureEditProfile" default="adobeRestrictions"
                                  type="PortalSignatureEditProfileType">
                        <xs:annotation>
                            <xs:documentation>
                                <p>Defines the profile whose rules web services have to check before they can come to execution. These profiles define a set of rules concerning the validity of signatures. A web service whose execution for a given signed document would violate the rule set selected here should instead abort with an appropriate error code.
                                    <ul>
                                        <li>adobeRestrictions = Only those changes are allowed that are enabled by the included signatures. This follows the specifications given by Adobe.</li>
                                        <li>generalEditRestrictions = All changes to signed documents are prohibited, even those that might be allowed according to the included signatures.</li>
                                        <li>noEditRestrictions = Editing of signed documents is not restricted and all changes are allowed. (By doing this, you accept the possible invalidation of included signatures.)</li>
                                    </ul>
                                </p>
                                <p>
                                    <b>Important:</b>
                                    You can find further explanations of these profiles in the chapter "Signature Validation".
                                </p>
                            </xs:documentation>
                        </xs:annotation>
                    </xs:attribute>
                </xs:complexType>
            </xs:element>
            <xs:element name="compress" minOccurs="0">
                <xs:complexType>
                    <xs:attribute name="compressProfile" default="never" type="PortalCompressProfileType">
                        <xs:annotation>
                            <xs:documentation>
                                <p>Sets the profile for automatic document compression and thus defines whether compression should be applied when saving.
                                    <ul>
                                        <li>always = PDF documents should always be compressed when saved.</li>
                                        <li>never = PDF documents should not be automatically compressed.</li>
                                        <li>recompress = PDF documents should only be compressed automatically if they were already compressed previously.</li>
                                    </ul>
                                </p>
                            </xs:documentation>
                        </xs:annotation>
                    </xs:attribute>
                </xs:complexType>
            </xs:element>
        </xs:all>
    </xs:complexType>
    <xs:simpleType name="PortalSignatureEditProfileType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="adobeRestrictions"/>
            <xs:enumeration value="generalEditRestrictions"/>
            <xs:enumeration value="noEditRestrictions"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="PortalCompressProfileType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="always"/>
            <xs:enumeration value="never"/>
            <xs:enumeration value="recompress"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:complexType name="PortalAuthType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines which settings apply for authentication to the portal.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:all>
            <xs:element name="timeout" type="PortalAuthTimeoutType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines the timeout settings related to authentication and session.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:all>
        <xs:attribute name="enabled" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>Defines whether the login for the front end portal page is available or not. This has no effect on the admin page, which is always available.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="allowAnonymous" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If enabled, then anonymous login (without username and password) are allowed on the front end portal page. This has no effect on the admin page, which always denies anonymous access.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="PortalAuthTimeoutType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the timeout settings related to authentication and session.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="inactivity" default="60">
            <xs:annotation>
                <xs:documentation>
                    <p>Defines the time in seconds after which a user should be considered inactive if no activity is detected in the portal. If the value is '0', then the detection is disabled, i.e. the user is never inactive.</p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="0"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="autoRefresh" default="300">
            <xs:annotation>
                <xs:documentation>
                    <p>Defines the time in seconds before the access token expires at which an auto-refresh is performed. The auto-refresh prevents the session from expiring and the access token from becoming unusable. If the user is considered inactive, then a dialog is displayed before the auto-refresh is executed. If the value is '0', then the auto-refresh is disabled, i.e. the session ends when the access token expires.</p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="0"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
    </xs:complexType>
    <xs:simpleType name="TsaHashAlgorithm">
        <xs:restriction base="xs:string">
            <xs:enumeration value="MD5"/>
            <xs:enumeration value="SHA-1"/>
            <xs:enumeration value="SHA-224"/>
            <xs:enumeration value="SHA-256"/>
            <xs:enumeration value="SHA-384"/>
            <xs:enumeration value="SHA-512"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="GlobalKeystoreFormatType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="NONE"/>
            <xs:enumeration value="JKS"/>
            <xs:enumeration value="PKCS11"/>
            <xs:enumeration value="PKCS12"/>
            <xs:enumeration value="WINDOWS_MACHINE"/>
            <xs:enumeration value="WINDOWS_USER"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:complexType name="SharePointBridgeAppType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the settings for the registered application on the Microsoft identity platform for access to the SharePoint Online site</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="applicationId" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The ID of the application that was assigned during creation</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="tenantId" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The id of the tenant to which the application belongs</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="clientSecret" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The secret that was generated for the application</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="SharePointBridgeSiteType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the name of the Sharepoint Online site that is used for document conversion. Access to the site must be configured as a registered application on the Microsoft identity platform</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="siteName" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The name of the site to be used for converting the documents</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:simpleType name="QueueModeType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines how the size of the queue is determined.</p>
                <p>With <code>AUTO</code>, it is calculated automatically by the server based on the number of configured instances.
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:enumeration value="AUTO"/>
            <xs:enumeration value="MANUAL"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:complexType name="MetricsType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the configuration for collecting and exporting application metrics using the Micrometer framework.</p>
                <p>Metrics are collected across multiple architectural layers:</p>
                <ul>
                    <li><b>HTTP Layer</b>: Measures complete HTTP request lifecycle including authentication and routing
                    </li>
                    <li><b>API Layer</b>: Tracks REST endpoint execution time and request counts
                    </li>
                    <li>
                        <b>Service Layer</b>: Monitors the execution of business logic (web service operation) in terms of duration and invocations
                    </li>
                    <li><b>Thread Pool Layer</b>: Tracks thread pool (web service instances) utilization and queue depth
                    </li>
                    <li><b>JVM Layer</b>: Collects Java Virtual Machine metrics (memory, GC, threads)
                    </li>
                    <li><b>System Layer</b>: Monitors system resources (CPU, disk, file descriptors)
                    </li>
                </ul>
                <p>Metrics can be exported to Prometheus and/or JMX for monitoring and visualization in tools like Grafana.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:all>
            <xs:element name="application" type="MetricsApplicationType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Configures general application-wide metrics settings including percentiles, cardinality limits, and common tags.</p>
                        <p>These settings apply globally to all metric types unless overridden by specific layer configurations.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="auth" type="MetricsAuthType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Configures authentication requirements for accessing the <code>/metrics</code> HTTP endpoint.
                        </p>
                        <p>When enabled, clients must provide valid credentials via Basic Auth or Bearer Token.</p>
                        <p>Primary configuration is defined directly in this XML block via attributes
                            <code>username</code>, <code>password</code> and <code>token</code>.</p>
                        <p>Optional runtime overrides can be applied via environment variables or system properties.
                            Runtime overrides have higher priority than XML values.</p>
                        <ul>
                            <li>
                                <code>WEBPDF_METRICS_AUTH_USERNAME</code>
                                / <code>webpdf.metrics.auth.username</code>
                            </li>
                            <li>
                                <code>WEBPDF_METRICS_AUTH_PASSWORD</code>
                                / <code>webpdf.metrics.auth.password</code>
                            </li>
                            <li>
                                <code>WEBPDF_METRICS_AUTH_TOKEN</code>
                                / <code>webpdf.metrics.auth.token</code>
                            </li>
                        </ul>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="httpMetrics" type="MetricsHttpType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Configures metrics collection for the HTTP transport layer (Layer 1).</p>
                        <p>Measures complete HTTP request lifecycle including network I/O, authentication, CORS, and routing overhead.</p>
                        <p>Collected metrics include:</p>
                        <ul>
                            <li><code>http_server_requests</code>: Total request duration timer
                            </li>
                            <li><code>http_server_requests_active</code>: Currently active HTTP requests gauge
                            </li>
                            <li><code>http_server_request_size</code>: HTTP request body size distribution
                            </li>
                            <li><code>http_server_response_size</code>: HTTP response body size distribution
                            </li>
                            <li><code>http_server_errors_client</code>: 4xx client error counter
                            </li>
                            <li><code>http_server_errors_server</code>: 5xx server error counter
                            </li>
                        </ul>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="apiMetrics" type="MetricsApiType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Configures metrics collection for the REST API layer (Layer 2).</p>
                        <p>Tracks Jersey REST endpoint execution including request deserialization, resource method invocation, and response serialization.</p>
                        <p>Collected metrics include:</p>
                        <ul>
                            <li><code>api_operation_duration</code>: REST endpoint processing time timer
                            </li>
                        </ul>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="serviceMetrics" type="MetricsServiceType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Configures metrics collection for the business logic layer (Layer 3).</p>
                        <p>Monitors the execution of business logic (web service operation) in terms of duration, invocations and number of errors.</p>
                        <p>Collected metrics include:</p>
                        <ul>
                            <li>
                                <code>service_method_duration</code>: Total request duration from worker submission to response
                            </li>
                            <li><code>service_method_requests_total</code>: Total service method invocation counter
                            </li>
                            <li><code>service_method_errors_total</code>: Failed service method invocation counter
                            </li>
                        </ul>
                        <p>Applied to all server classes annotated with <code>@TimedService</code>.
                        </p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="threadPoolMetrics" type="MetricsThreadPoolType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Configures metrics collection for the thread pool and worker execution layer (Layer 4).</p>
                        <p>Tracks thread pool (web service instances) utilization, queue depth, and worker lifecycle metrics.</p>
                        <p>Collected metrics include:</p>
                        <ul>
                            <li><code>threadpool_active</code>: Currently active worker threads gauge
                            </li>
                            <li><code>threadpool_size</code>: Thread pool size gauge
                            </li>
                            <li><code>threadpool_queue_size</code>: Blocking queue size gauge
                            </li>
                            <li><code>threadpool_queue_capacity</code>: Maximum queue capacity gauge
                            </li>
                            <li><code>threadpool_queue_remaining</code>: Remaining queue capacity gauge
                            </li>
                            <li><code>threadpool_completed</code>: Completed task counter
                            </li>
                            <li><code>threadpool_submitted</code>: Submitted task counter
                            </li>
                            <li><code>threadpool_rejected</code>: Rejected task counter
                            </li>
                        </ul>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="jvmMetrics" type="MetricsJvmType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Configures metrics collection for Java Virtual Machine (JVM) internal metrics.</p>
                        <p>Provides visibility into JVM health, memory usage, garbage collection, and thread activity.</p>
                        <p>Collected metrics include:</p>
                        <ul>
                            <li><b>Memory metrics</b>: Heap, non-heap, buffer pools, and memory pool usage
                            </li>
                            <li><b>Garbage collection metrics</b>: GC pause times, frequency, and memory reclaimed
                            </li>
                            <li><b>Thread metrics</b>: Live threads, daemon threads, peak threads, thread states
                            </li>
                            <li><b>Class loader metrics</b>: Loaded classes, unloaded classes
                            </li>
                        </ul>
                        <p>Essential for diagnosing memory leaks, GC issues, and performance problems.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="systemMetrics" type="MetricsSystemType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Configures metrics collection for operating system and hardware resources.</p>
                        <p>Monitors system-level resources that affect application performance.</p>
                        <p>Collected metrics include:</p>
                        <ul>
                            <li><b>CPU metrics</b>: System CPU usage, process CPU usage, available processors
                            </li>
                            <li><b>Disk metrics</b>: Disk space usage, free space, total space
                            </li>
                            <li><b>File descriptor metrics</b>: Open file descriptors, maximum file descriptors
                            </li>
                            <li><b>Uptime metrics</b>: Application uptime
                            </li>
                            <li><b>Tomcat metrics</b>: Servlets, threads, request counts, error counts
                            </li>
                        </ul>
                        <p>Useful for capacity planning and identifying resource bottlenecks.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="jmx" type="MetricsJmxType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Configures Java Management Extensions (JMX) registry for metrics export.</p>
                        <p>JMX metrics can be viewed using standard tools like JConsole, VisualVM, or JMC (Java Mission Control).</p>
                        <p>Useful for local development and troubleshooting without requiring external monitoring systems.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="prometheus" type="MetricsPrometheusType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Configures Prometheus registry for metrics export.</p>
                        <p>Prometheus is the primary time-series database for production monitoring and can be visualized using Grafana dashboards.</p>
                        <p>Metrics are exposed via HTTP endpoint at <code>/metrics</code> in Prometheus text exposition format.
                        </p>
                        <p>Prometheus server scrapes this endpoint periodically to collect metrics.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:all>
        <xs:attribute name="preset" type="metricsPresetType">
            <xs:annotation>
                <xs:documentation>
                    <p>Selects a predefined configuration preset optimized for different environments.</p>
                    <p>Available presets:</p>
                    <ul>
                        <li>
                            <code>production</code>: Optimized for production with minimal overhead (percentiles disabled, cardinality limits enabled)
                        </li>
                        <li><code>development</code>: Full metrics with percentiles for local development and debugging
                        </li>
                        <li><code>minimal</code>: Only essential metrics enabled (API and service layers)
                        </li>
                        <li><code>custom</code>: Use explicit configuration from child elements
                        </li>
                    </ul>
                    <p>Individual settings can override preset defaults when specified explicitly.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="enabled" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>Master switch for the complete metrics subsystem.</p>
                    <p>When set to <code>false</code>, no metrics are collected, exported, or exposed via endpoint/filter integrations.</p>
                    <p>This setting has precedence over all other metrics options and layer flags.</p>
                    <p>Default:
                        <code>true</code>
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="MetricsBasicType">
        <xs:annotation>
            <xs:documentation>
                <p>Base type for metric layer configuration.</p>
                <p>Provides a common <code>enabled</code> attribute to control whether the metrics collection is active for a specific layer.
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="enabled" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>Enables or disables metrics collection for this layer.</p>
                    <p>When disabled, no metrics are collected or exported, reducing overhead.</p>
                    <p>Default:
                        <code>true</code>
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="MetricsHttpType">
        <xs:annotation>
            <xs:documentation>
                <p>Configuration for HTTP transport layer metrics (Layer 1).</p>
                <p>Inherits <code>enabled</code> attribute from <code>MetricsBasicType</code>.
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="MetricsBasicType"/>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="MetricsApiType">
        <xs:annotation>
            <xs:documentation>
                <p>Configuration for REST API layer metrics (Layer 2).</p>
                <p>Inherits <code>enabled</code> attribute from <code>MetricsBasicType</code>.
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="MetricsBasicType"/>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="MetricsServiceType">
        <xs:annotation>
            <xs:documentation>
                <p>Configuration for business logic layer metrics (Layer 3).</p>
                <p>Inherits <code>enabled</code> attribute from <code>MetricsBasicType</code>.
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="MetricsBasicType"/>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="MetricsThreadPoolType">
        <xs:annotation>
            <xs:documentation>
                <p>Configuration for thread pool and worker execution layer metrics (Layer 4).</p>
                <p>Inherits <code>enabled</code> attribute from <code>MetricsBasicType</code>.
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="MetricsBasicType"/>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="MetricsJvmType">
        <xs:annotation>
            <xs:documentation>
                <p>Configuration for Java Virtual Machine internal metrics.</p>
                <p>Inherits <code>enabled</code> attribute from <code>MetricsBasicType</code>.
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="MetricsBasicType"/>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="MetricsSystemType">
        <xs:annotation>
            <xs:documentation>
                <p>Configuration for operating system and hardware resource metrics.</p>
                <p>Inherits <code>enabled</code> attribute from <code>MetricsBasicType</code>.
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="MetricsBasicType"/>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="MetricsJmxType">
        <xs:annotation>
            <xs:documentation>
                <p>Configuration for Java Management Extensions (JMX) metrics export.</p>
                <p>JMX allows metrics to be accessed via standard Java management tools like JConsole, VisualVM, and JMC.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="enabled" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>Enables or disables JMX metrics export.</p>
                    <p>When enabled, metrics are registered as MBeans and can be viewed in JMX-compatible tools.</p>
                    <p>Default:
                        <code>true</code>
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="domain" default="webpdf.metrics" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Specifies the JMX domain name under which metrics are registered.</p>
                    <p>The domain groups related MBeans together in JMX management tools.</p>
                    <p>Default:
                        <code>webpdf.metrics</code>
                    </p>
                    <p>Example ObjectName:
                        <code>webpdf.metrics:name=http_server_requests,type=timers</code>
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="MetricsPrometheusType">
        <xs:annotation>
            <xs:documentation>
                <p>Configuration for Prometheus metrics export.</p>
                <p>Prometheus is a time-series monitoring system that scrapes metrics from HTTP endpoints.</p>
                <p>When enabled, metrics are exposed at <code>/metrics</code> endpoint in Prometheus text format.
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="enabled" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>Enables or disables Prometheus metrics export.</p>
                    <p>When enabled, metrics are available at the <code>/metrics</code> HTTP endpoint.
                    </p>
                    <p>Prometheus server should be configured to scrape this endpoint periodically.</p>
                    <p>Default:
                        <code>true</code>
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="MetricsApplicationType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines application-wide metrics configuration including percentiles, cardinality limits, and common tags.</p>
                <p>These settings affect memory usage and metric granularity across all metric types.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:all minOccurs="0">
            <xs:element name="percentiles" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines custom percentile values for timer metrics (e.g., p50, p95, p99).</p>
                        <p>Percentiles provide statistical distribution data but consume significant memory (~1MB per timer).</p>
                        <p>If not specified and <code>percentilesEnabled="true"</code>, defaults to [0.5, 0.95, 0.99].
                        </p>
                    </xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="percentile" maxOccurs="unbounded">
                            <xs:annotation>
                                <xs:documentation>
                                    <p>A single percentile value between 0.0 and 1.0.</p>
                                    <p>Common values: 0.5 (median), 0.95 (95th percentile), 0.99 (99th percentile), 0.999 (99.9th percentile)</p>
                                </xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                                <xs:restriction base="xs:double">
                                    <xs:minInclusive value="0"/>
                                    <xs:maxInclusive value="1"/>
                                </xs:restriction>
                            </xs:simpleType>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:all>
        <xs:attribute name="percentilesEnabled" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>Enables or disables percentile calculation for timer metrics.</p>
                    <p>When enabled, percentile distributions (p50, p95, p99) are calculated and exported.</p>
                    <p><b>Memory Impact</b>: Each timer with percentiles consumes approximately 1MB of memory.
                    </p>
                    <p>
                        <b>Recommendation</b>: Disable in production to reduce memory footprint (~560MB savings for typical deployment).
                    </p>
                    <p>Default:
                        <code>true</code>
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="tag" default="webPDF" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Common tag value applied to all metrics as <code>application="..."</code>.
                    </p>
                    <p>This tag identifies the application in multi-tenant monitoring systems like Prometheus.</p>
                    <p>Useful when multiple applications export metrics to the same monitoring infrastructure.</p>
                    <p>Default:
                        <code>webPDF</code>
                    </p>
                    <p>Example metric:
                        <code>http_server_requests{application="webPDF",method="POST"}</code>
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="endpointEnabled" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>Enables or disables the HTTP metrics endpoint at <code>/metrics</code>.
                    </p>
                    <p>When disabled, metrics are still collected but not exposed via HTTP.</p>
                    <p>This is useful when using only JMX export or when metrics should not be accessible externally.</p>
                    <p>Default:
                        <code>true</code>
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="maxEndpoints" default="-1" type="xs:int">
            <xs:annotation>
                <xs:documentation>
                    <p>Maximum number of unique REST endpoints to track separately.</p>
                    <p>Limits metric cardinality to prevent memory exhaustion from dynamic URLs.</p>
                    <p>When limit is reached, additional endpoints share a common metric with tag <code>endpoint="overflow"</code>.
                    </p>
                    <p>Value <code>-1</code> means unlimited (not recommended for production).
                    </p>
                    <p>Default: <code>-1</code> (unlimited)
                    </p>
                    <p><b>Recommendation</b>: Set to 100-500 in production environments.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="maxUris" default="-1" type="xs:int">
            <xs:annotation>
                <xs:documentation>
                    <p>Maximum number of unique URI paths to track separately in HTTP metrics.</p>
                    <p>Prevents cardinality explosion from dynamic URI segments or query parameters.</p>
                    <p>When limit is reached, additional URIs share a common metric with tag <code>uri="overflow"</code>.
                    </p>
                    <p>Value <code>-1</code> means unlimited (not recommended for production).
                    </p>
                    <p>Default: <code>-1</code> (unlimited)
                    </p>
                    <p><b>Recommendation</b>: Set to 100-500 in production environments.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="maxStatusCodes" default="-1" type="xs:int">
            <xs:annotation>
                <xs:documentation>
                    <p>Maximum number of unique HTTP status codes to track separately.</p>
                    <p>Limits metric cardinality for HTTP status code tags.</p>
                    <p>Value <code>-1</code> means unlimited.
                    </p>
                    <p>Default: <code>-1</code> (unlimited)
                    </p>
                    <p>
                        <b>Note</b>: Status codes are typically limited (~60 standard codes), so this rarely needs adjustment.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="metricCountWarningThreshold" default="10000" type="xs:int">
            <xs:annotation>
                <xs:documentation>
                    <p>Threshold for logging a warning when total metric count exceeds this value.</p>
                    <p>High metric counts indicate potential cardinality explosion and memory issues.</p>
                    <p>Use this to detect unbounded metric growth in production.</p>
                    <p>Default:
                        <code>10000</code>
                    </p>
                    <p>
                        <b>Guideline</b>: Typical deployments should have &lt;5000 metrics. Over 10000 indicates configuration issues.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="MetricsAuthType">
        <xs:annotation>
            <xs:documentation>
                <p>Configures authentication requirements for accessing the <code>/metrics</code> endpoint.
                </p>
                <p>When enabled, prevents unauthorized access to application metrics which may contain sensitive information.</p>
                <p>Primary credentials are configured via XML attributes <code>username</code>, <code>password</code> and <code>token</code>.</p>
                <p>Environment variables and system properties are optional runtime overrides and take precedence over XML values.</p>
                <p>If both Basic Auth credentials (<code>username</code>/<code>password</code>) and a Bearer token
                    (<code>token</code>) are configured, both authentication methods are active at the same time.
                    At request runtime, the method is selected by the HTTP <code>Authorization</code> scheme
                    (<code>Basic</code> or <code>Bearer</code>).</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="enabled" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>Enables or disables authentication for the metrics endpoint.</p>
                    <p>When enabled, requests must include valid credentials:</p>
                    <ul>
                        <li><b>Basic Auth</b>: Configure in XML with <code>username</code>/<code>password</code> or override via
                            <code>WEBPDF_METRICS_AUTH_USERNAME</code> / <code>webpdf.metrics.auth.username</code> and
                            <code>WEBPDF_METRICS_AUTH_PASSWORD</code> / <code>webpdf.metrics.auth.password</code>
                        </li>
                        <li><b>Bearer Token</b>: Configure in XML with <code>token</code> or override via
                            <code>WEBPDF_METRICS_AUTH_TOKEN</code> / <code>webpdf.metrics.auth.token</code>
                        </li>
                    </ul>
                    <p>When disabled, metrics endpoint is publicly accessible (suitable for development only).</p>
                    <p>Default:
                        <code>true</code>
                    </p>
                    <p><b>Security</b>: Always enable in production environments to protect sensitive operational data.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="username" default="prometheus" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Username used for Basic Auth on the metrics endpoint.</p>
                    <p>Default:
                        <code>prometheus</code>
                    </p>
                    <p>Primary source: XML attribute <code>username</code>.</p>
                    <p>Can be overridden via <code>WEBPDF_METRICS_AUTH_USERNAME</code> or <code>webpdf.metrics.auth.username</code>.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="password" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Password used for Basic Auth on the metrics endpoint.</p>
                    <p>Primary source: XML attribute <code>password</code>.</p>
                    <p>Can be overridden via <code>WEBPDF_METRICS_AUTH_PASSWORD</code> or <code>webpdf.metrics.auth.password</code>.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="token" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Bearer token used as alternative authentication on the metrics endpoint.</p>
                    <p>Primary source: XML attribute <code>token</code>.</p>
                    <p>Can be overridden via <code>WEBPDF_METRICS_AUTH_TOKEN</code> or <code>webpdf.metrics.auth.token</code>.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <!-- Preset enumeration -->
    <xs:simpleType name="metricsPresetType">
        <xs:annotation>
            <xs:documentation>
                <p>Predefined metric configuration presets optimized for different deployment environments.</p>
                <p>Presets provide sensible defaults that can be overridden by explicit element configurations.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:enumeration value="production">
                <xs:annotation>
                    <xs:documentation>
                        <p>Optimized for production environments with minimal memory overhead.</p>
                        <ul>
                            <li>Percentiles: <b>Disabled</b> (saves ~560MB memory)
                            </li>
                            <li>Cardinality limits: <b>Enabled</b> (maxEndpoints=100, maxUris=100)
                            </li>
                            <li>Authentication:
                                <b>Required</b>
                            </li>
                            <li>All layers:
                                <b>Enabled</b>
                            </li>
                        </ul>
                        <p>Suitable for production deployments where stability and resource efficiency are priorities.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="development">
                <xs:annotation>
                    <xs:documentation>
                        <p>Full-featured configuration for local development and debugging.</p>
                        <ul>
                            <li>Percentiles: <b>Enabled</b> (provides detailed distribution data)
                            </li>
                            <li>Cardinality limits: <b>Disabled</b> (unlimited tracking)
                            </li>
                            <li>Authentication: <b>Disabled</b> (easy access)
                            </li>
                            <li>All layers:
                                <b>Enabled</b>
                            </li>
                            <li>Logging:
                                <b>Verbose</b>
                            </li>
                        </ul>
                        <p>Suitable for development environments where detailed metrics are needed for troubleshooting.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="minimal">
                <xs:annotation>
                    <xs:documentation>
                        <p>Minimal configuration with only essential business metrics.</p>
                        <ul>
                            <li>Percentiles:
                                <b>Disabled</b>
                            </li>
                            <li>HTTP/System/JVM metrics:
                                <b>Disabled</b>
                            </li>
                            <li>API and Service metrics:
                                <b>Enabled</b>
                            </li>
                            <li>Authentication:
                                <b>Required</b>
                            </li>
                        </ul>
                        <p>Suitable for constrained environments or when only business KPIs are needed.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="custom">
                <xs:annotation>
                    <xs:documentation>
                        <p>No preset defaults applied - all configuration must be explicitly specified.</p>
                        <p>Provides complete control over every metric configuration parameter.</p>
                        <p>Use when fine-grained customization is required beyond standard presets.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
        </xs:restriction>
    </xs:simpleType>
</xs:schema>
