Overview

What is a view template ?
You can share part of a configuration file between several data view by using parametrable view templates. A view template is a XSL stylesheet that creates one or several <view> elements from a <view-template> element.

A view template can be instantiated by using the <view-template> element. The element <view-template> has the same attributes and child elements as a data view, except that it can not specify any adaptor. A <view-template> is configured by using <parameter> elements as in adaptors.

Provided templates

XSLT operation template
This template enables sending a XSLT stylesheet to execute.
    <view-template name="xsltproc" stylesheet="template/XSLTOperationTemplate.xsl">
        <parameter name="excluded_categories">|Monitoring|Configuration|Environment|Documentation|Hidden|</parameter>
    </view-template>
see template
Non-regression testing template
This template enables non-regression testing (see chapter "Tools for debugging configuration").
    <view-template name="assert" stylesheet="template/NonRegressionTemplate.xsl">
        <parameter name="test-suite">test-suite.xml</parameter>
        <parameter name="expected">expected.xml</parameter>
    </view-template>
see template
SOAP template
This template enables support for SOAP protocol over HTTP connector.
    <view-template name="soap" stylesheet="template/SOAPTemplate.xsl">
        <argument name="id"></argument>
        <parameter name="url">https://train-ars.ggus.eu/arsys/services/ARService?server=train-ars&webService=GGUS_OPS</parameter>
        <parameter name="operation">ns:OpGetOps</parameter>
        <parameter name="parameters" eval="concat('<GHD_Request_ID xmlns="urn:GGUS_OPS">',$id,'</GHD_Request_ID>')"></parameter>
        <parameter name="SOAPHeader">
            <AuthenticationInfo><userName>opsuser</userName><password>?rsvxvhu#</password></AuthenticationInfo>
        </parameter>
    </view-template>
see template
SQL schema template
This template generates a graph of the relationships between the tables of a relational database.
    <view-template name="database_schema" stylesheet="template/SQLSchemaTemplate.xsl">
        <parameter name="driver">org.hsqldb.jdbcDriver</parameter>
        <parameter name="url">jdbc:hsqldb:file:var/lavoisier-cache</parameter>
        <parameter name="username">sa</parameter>
        <parameter name="password"></parameter>
    </view-template>
see template
XPath to SQL template
This template enables support for XPath language on top of SQL connector.
    <view-template name="database" stylesheet="template/XPath2SQLTemplate.xsl">
        <parameter name="driver">org.hsqldb.jdbcDriver</parameter>
        <parameter name="url">jdbc:hsqldb:file:var/lavoisier-cache</parameter>
        <parameter name="username">sa</parameter>
        <parameter name="password"></parameter>
    </view-template>
see template
Sets intersection template
This template enables intersecting 2 sets of values.
    <view-template name="intersection" stylesheet="/template/IntersectionTemplate.xsl">
        <parameter name="input_view">all_sets</parameter>
        <parameter name="base_path">/ROOT</parameter>
        <parameter name="set_path">SERVICE</parameter>
        <parameter name="item_path">VO/@id</parameter>
    </view-template>
see template