Processing

This enables you to configure pre- and post processing for documents. This allows you to modify the document before the document is opened in the Fonto Editor (pre-processing) and allows you to modify the document before saving in your storage provider (post-processing).

The processing configuration is separated in pre- and post processing.

documentProcessing.xml

XML

<documentProcessing xmlns="http://schemas.fontoxml.com/connectors/2.0/documentProcessing.xsd" xmlns:xlink="http://www.w3.org/1999/xlink">
    <!--Configure the processing documents-->
    <processing>
		<pre>
			<!--Add pre processing steps here-->
		</pre>
		<post>
			<!--Add post processing steps here-->
		</post>
    </processing>
</documentProcessing>

XSLT

This enables you to configure XSLTs to be run during the pre- and/or post processing.

documentProcessing.xml

XML

<documentProcessing xmlns="http://schemas.fontoxml.com/connectors/2.0/documentProcessing.xsd" xmlns:xlink="http://www.w3.org/1999/xlink">
    <!--Configure the processing documents-->
    <processing>
		<pre>
			<xslt filename="myPreProcessingXslt.xslt"/>
			<xslt filename="mySecondPreProcessingXslt.xslt"/>
		</pre>
		<post>
			<xslt filename="myPostProcessingXslt.xslt"/>
		</post>
    </processing>
</documentProcessing>

The XSLTs will be executed in the same order as they are added to the pre or post processing configuration.

The XSLTs have to be added to the correct directory in Fonto Connectors. For example ./processing/pre/myPreProcessingXslt.xslt or ./processing/post/myPostProcessingXslt.xslt.