New Systems

You can use the Validator to create your own new systems, for validation, annotation and transformation.

1. From the Validator, click on the Options button.

 

2. The Options box will appear, opened at the Configuration tab. Select one of the custom configurations, Custom 1 to Custom 4. and then click on the Settings button for it.

3. Click on Save if you want this Custom processing to be the default configuration for future sessions. Click on OK to accept the changes for this session and return to the Options box. If you want to exit without making Custom the default configuration, just click on Cancel.

Now when you press Run in the main window, the data files will be processed against your custom schema to generate files.

The resulting text comes up as a list which can be viewed one at a time in the viewer. You can make minor edits to the text in the viewer, cut (using Ctrl-c) and paste (using Ctrl-v), print (using the Print button or Ctrl-p), and save (using the Save button Ctrl-s) each result.

Of course, you need to supply your own XSLT scripts.

Hint: One of the easiest ways to create a new system is to create is as a front-end to Schematron. Use the Preprocess setting for this.

Hint: If you are making up your own schema language, to allow validation, annotation or transformation, write a DTD, Schematron schema or XML Schema for it, and place these in the Scripts directory. Now you can debug your language using the other Validator functionality.

Suggestion: Do you need a project? Try to create a workable XSLT validator using the Topologi Schematron Validator. It would be really useful, but we haven't gotten round to it ourselves. Put it in the public domain as open source code.

Engine Arrangement

The Topologi Schematron Validator is a reconfigurable system of XSLT processors and viewers. Configurations using different arrangements of XSLT processes can be created, and saved. The scripts for the various XSLT processors can be independently specified. Standard configurations are provided to perform Schematron validation, etc.

Following are the processor topologies possible.

Main Stream: Single Processor

If the XSLT arrangement is chosen, then each file will be processed by a single XSLT process. The script is taken from the Schema or Script selection list, not from the Options box.

If the file selected to be the script is not an XSLT script, then the input file will be sent to the output file, using XSLT's default processing rules. If you are baffled that no processing has been done, then your XSLT script probably is using the wrong namespace.

The current script filename is available in the parameter $SCHEMANAME. The URL of the current directory of the script file is available in the parameter $SCHEMADIR.

The current input filename is available to this process in the parameter $FILENAME. The URL of the current directory of the input file is available to this process in the parameter $DATADIR. You can use these for creating links to the original documents.

Main Stream: Two Processors in Series

If the Normal arrangement is chosen, then each file will be processed by a single XSLT process. The script is taken from the main box, but is first compiled using the Engine Script, which is an XSLT script that must produce an XSLT script.

The Engine Script (in the Settings box) compiles the Schema Script (from the main Validator's right-hand side) once when the Run button is pressed. Then each XML file is processed using that script. So the parameters available to the "runtime" and "compiletime" scripts are different.

The current script filename is available in the parameter $SCHEMANAME. The URL of the current directory of the script file is available in the parameter $SCHEMADIR.

The current input filename is available to the "runtime" process in the parameter $FILENAME. The URL of the current directory of the input file is available to this process in the parameter $DATADIR. You can use these for creating links to the original documents. Thus, this information is not available to the Engine Script at compile time, but only to the generated script. (i.e., you can reference it in the axsl: but not the xsl: embedded XSLT elements of the Engine Script.

This is the normal mode for Schematron. The Examplotron system also could use this mode.

Main Stream: Three Processors in Series

If the Preprocessor arrangement is selected, then processing is the same as the previous section, except that the incoming schema is first preprocessed by the Preprocessor Script.

This preprocessing occurs at compile time, so the $FILENAME and $DATADIR parameters are not available to this script.

The current script filename is available to all processes in the parameter $SCHEMANAME. The URL of the current directory of the script file is available in the parameter $SCHEMADIR.

This arrangement is used for extracting Schematron schemas embedded in W3C XML Schemas schemas.

It provides a convenient route for implementing or prototyping schema languages on top of Schematron.

Parallel Stream: Annotation Processor

You can select different viewers. If you select the 2-Pane Viewer then you also must supply an annotation script.

In this arrangement, the input file will also be sent to this annotation processor, which is a single XSLT process. The script for this is set in the Annotation Script edit box.

The current script filename is available in the parameter $SCHEMANAME. The URL of the current directory of the script file is available in the parameter $SCHEMADIR.

The current input filename is available to this process in the parameter $FILENAME. The URL of the current directory of the input file is available to this process in the parameter $DATADIR. You can use these for creating links to the original documents.

Next topic >>