Rule based validation example
If you want to do a schematron validation, then you first need to insert the Rule based XML validation component:

A simple schemation validation file could be this:
<schema xmlns="http://purl.oclc.org/dsdl/schematron">
<pattern name="Print both cases">
<rule context="/Root/Document/DocumentNo">
<report test="floor(.) = number(.)">O.K.</report>
<assert test="floor(.) = number(.)">A Document number is not an integer.</assert>
</rule>
</pattern>
</schema>
This reports the error: A Document number is not an integer, if any of the nodes with the path: /Root/Document/DocumentNo is not an integer.
This schematron file is loaded into the Library into validationRule.
The payload after the validation is unchanged i.e. it contains the input file, that was validated. After the validation two
predefined variables are created:
RuleValidationOutcome
This
variable contains the result of the validation. It can either be
'SUCCESS' or 'FAILED'. In the valid branch it contains the value
'SUCCESS' and in the Invalid branch the value is 'FAILED'.
RuleValidationReport
In
both output branches this variable contains the detailed XML report of
the validation. You can e.g. convert the variable to a file with the
workflow component, From variable to file or save the variable to a resource. In this report you can e.g. verify what the errors and warnings were.
The subtree can e.g. contain this to report the result into the system log with the Rule based validation report to log component, and copy the validated XML file to the file system as the name: valid.xml or invalid.xml depending on the result of the validation:

Related Articles
Rule-based XML validation
This advanced validation workflow component, Rule-based XML validation, can validate XML according to rules. The rules for rule-based validation can be used to validate documents in XML format. A suggestion for implementation can be found here. The ...
Rule-based validation report to log
This advanced validation workflow component, Rule-based validation report to log, can be executed after a rule-based XML validation. If called it will copy the validation report into the system log. A suggestion for implementation can be found here. ...
Rule-based validation report to text attachment
This advanced validation workflow component, Rule-based validation report to text attachment, can be executed after a rule-based XML validation. If called it will copy the validation report into a text attachment, which can be emailed. A suggestion ...
Rule-based validation report to XML attachment
This advanced validation workflow component, Rule-based validation report to XML attachment, can be executed after a rule-based XML validation. If called it will copy the validation report into an XML attachment, which can be emailed. This XML ...
Advanced Validation workflow components
This is the list of advanced validation document workflow components: Rule-based validation report to log. Rule-based validation report to text attachment. Rule-based validation report to XML attachment. Rule-based XML validation. Validate XML ...