Please enable JavaScript to view this site.

InterFormNG2 Manual

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

 

NG2Schematron0002

 

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 subtree can e.g. contain this to report the result into the system log with the Rule based valiedation 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:

 

NG2Schematron0003