Add XML type
To define an XML type, provide the XML schema definition file and a sample XML document. You can use XML types in the following situations:
-
Mapping the values of XML elements to the batch/folder/document index fields of a batch class. See Use XSL transformation to map metadata and XML data.
-
Rendering the values of XML elements as a TIFF or PDF. See Render XML documents.
-
Additionally, using XML types as filters in rules. See Add a rule.
A built-in XML type called ImportSession supports the standard Kofax Capture XML Import Connector compatible XML format. You do not need to import this XML type, as it is available automatically.
Use the following procedure to add an XML type.
- Open the KC Plug-In window and click the XML Types tab.
- On the XML Type Tasks menu, click Add XML Type.
- Browse to your XML schema definition file (.xsd).
- Browse to a sample XML file that uses the specified schema.
Now you can create a destination that uses this XML type. See Manage destinations.
Refer to the Kofax Import Connector Developers Guide for additional information about custom XML types.
Kofax Import Connector does not change the logical structure of the XML documents, but the text presentation is often modified:
-
Changes the XML code page to UTF-8.
-
Removes or changes the insignificant whitespace.
-
Removes or changes the character quotes or CDATA sections.
Validating XML types in Message Connector
You can configure Message Connector to reject received XML documents that cannot be validated against an XML schema. This feature is primarily useful for web service input, where the invalid document is immediately rejected, and the web service sender is informed about the reasons (failed validation). However, it applies to documents from all connectors, that is, non-valid XML will not be imported to Kofax Capture.
-
Copy the
C:\ProgramData\Kofax\KIC-ED\KCPlugIn\XMLTypes folder from the
KC Plug-In
computer to the
Message Connector
installation folder (by default,
<programs>\Kofax\KIC-ED\MC\).
-
The built-in XML type called ImportSession (standard Kofax Capture XML Import Connector compatible format) is available on Message Connector automatically, that is, if you are not using custom XML types, you can skip this step.
-
You need to repeat this step whenever you change the configured XML types in KC Plug-In.
-
- Start Message Connector Configuration utility from the Kofax Import Connector group in the Windows Start menu.
-
Go to the
Structured (XML) Input Handling tab and configure the following settings.
Types Enter a comma or blank separated list of MIME types or file extensions that should be treated as XML documents for automatic schema validation. This setting applies to import from email and folder (binary and XML file import mode only). Schema Validation Select one of the options:
- Disabled: If you do not want Message Connector to validate XML documents. All incoming XML documents are handled according to the configuration in KC Plug-In.
- Optional: If you want to validate XML documents for which an XML type has been defined. Documents that have a defined XML type but are not valid are handled according to the setting of the If Validation Fails parameter.
-
Required: If you want to validate all XML documents (a matching XML type must exist). Documents that do not have a matching XML type as well as documents that have fail validation are handled according to the setting of the If Validation Fails parameter.
If Validation Fails Select the action to take when an XML document is not valid:
- ·Do not apply XML handling: The document is treated as a non-XML document. It is also marked with a document conversion error.
-
Reject the message: The document is marked as invalid. Such documents are not imported to Kofax Capture. In the case of web service input, the sender is immediately informed about the reason for rejection. Even invalid documents are temporarily stored in the Message Connector for troubleshooting.
- Click Save.
- Click Exit and restart service.